Qt Creator Kit Issues

From Qt Wiki
Jump to: navigation, search

Qt Creator kits and Qt versions works great almost all the time, however, in some rare occasions, the detection might encounter some issues. This page tries to offer workarounds to fix that.

Invalid Auto-Detected Kits

Sometimes an old Qt version doesn't get deleted properly and get stuck in Qt Creator's list. See the version with the red icon in the picture below.

Faulty auto-detected Qt version

Qt Creator keeps those auto-detected versions around at a specific qtversion.xml file. A workaround to fix this is by manually editing that file and removing the faulty version.

Note: Do this on your own risk.

For Windows: C:\Qt\Tools\QtCreator\share\qtcreator\QtProject\qtcreator\qtversion.xml

For Linux: ~/Qt/Tools/QtCreator/share/qtcreator/QtProject/qtcreator/qtversion.xml

For macOS: ~/Qt/Qt Creator.app/Contents/Resources/QtProject/qtcreator/qtversion.xml

According to the picture, the Qt version with path ~/Qt/5.15.4/clang_64/qmake is faulty, in this case because it doesn't exist on the disk anymore.

We could look for that specific version and path in qtversion.xml and deleted the relevant block:

  <valuemap type="QVariantMap">
   <valuelist type="QVariantList" key="Abis"/>
   <value type="int" key="Id">-1</value>
   <value type="QString" key="Name">Qt %{Qt:Version} clang 64bit</value>
   <value type="QString" key="QMakePath">/Users/user/Qt/5.15.4/clang_64/bin/qmake</value>
   <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
   <value type="QString" key="autodetectionSource">SDK.qt.qt5.5154.clang_64</value>
   <value type="bool" key="isAutodetected">true</value>

Then save the changes (Qt Creator has to be closed first) and open Qt Creator again.