Qt Creator Kit Issues: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Qt version auto-detection issues with Qt Creator.)
 
No edit summary
 
Line 21: Line 21:
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.
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 part that is between <data></data> block:
We could look for that specific version and path in qtversion.xml and deleted the relevant block:
<code>
<syntaxhighlight lang="xml">
  < data>
...
  <data>
   <variable>QtVersion.9</variable>
   <variable>QtVersion.9</variable>
   <valuemap type="QVariantMap">
   <valuemap type="QVariantMap">
Line 34: Line 35:
   <value type="bool" key="isAutodetected">true</value>
   <value type="bool" key="isAutodetected">true</value>
   </valuemap>
   </valuemap>
  < /data>
  </data>
</code>
...
</syntaxhighlight>
Then save the changes (Qt Creator has to be closed first) and open Qt Creator again.
Then save the changes (Qt Creator has to be closed first) and open Qt Creator again.

Latest revision as of 09:39, 27 May 2021

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:

...
 <data>
  <variable>QtVersion.9</variable>
  <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>
  </valuemap>
 </data>
...

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