Qt6 imports with qtcreator 4.13+

Viewed 548

Qt6 supports importing QML modules without specifying the version number.

Example:

  • Qt5: import QtQuick 2.0
  • Qt6: import QtQuick

where Qt6 will just choose the newest version of the module.

My problem is, that the current version of qtcreator does not seem to know about this feature (or any Qt6 features, most likely). I get the following error:

QtQuick import error

Opening the Designer with this error present, results in an error message telling me, that the QML code is broken. Running the project works flawlessly. I work on Arch Linux and installed the whole qt6 group as well as pyside6 and the install was successful. I tried to add Qt6 functionality by choosing /usr/bin/qmake-qt6 under Tools > Options > Kits > Qt Versions > Add, but this did not change anything, which does not seem surprising to me, but I thought I would try.

Is anyone else facing this problem? Have I overseen something? Can I maybe select another QML linter in an option I did not see?

Any help will be very much appreciated, I will continue to work with hardcoded version numbers for now, but I really like this new feature.

0 Answers
Related