Only kit Qt5.5.1 found with QtCreator
-
Hi,
I'm using QtCreator 9.0.1, based on Qt 6.4.1 (GCC 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7], x86_64)
On OpenSuse tumbleweed, one of the latest snapshots.I have Qt5 and 6 installed, with devel-files in both versions for the modules I want to use.
Yet, when I want to create a new project, is sees only kit Qt 5.5.1 (System).
Anyone an idea how to change that, so as to have Qt6 included? -
@JoeCFD Tumbleweed is not old, on the contrary more bleeding edge, with snapshots nearly each working day. And as said, I am on one of the latest snapshots (a few days before now).
It offers both Qt5 as Qt6, as shown by invoking /usr/bin/qcreator, which starts the version I showed above.gcc -v gives gcc version 12.2.1 20221020
-
@JoeCFD Hi Joe, to be honest, I'm not very much interested in the version of Qt5, because I want to use Qt6.
But the version of Qt5 on my system is 5.15.7.
The problem is: qtcreator (as said version 9.0.1, based on Qt 6.4.1) only sees a Qt5 kit, and, as becomes apparent, even an older version as is installed on the system.
Why is that? How does qtcreator find the kits available? Why does it find a version not even available on the system, and not those that are available? -
Yes, 5.15.7 makes more sense. I guess default Qt version is Qt5. type
which qmake and
qmake --version
you will be able to see it.
use qtchooser to set qt to qt6. I posted messages about this before. Check it out from my messages.
Then qtcreator will be able to find it.https://forum.qt.io/topic/141071/qt-designer-6-on-ubuntu-22-04-jammy/8
-
@JoeCFD I'mnot sure if purging at5 from my system is a good idea: there are lots of dependencies on parts of qt5, without a qt6 counterpart.
I'm still puzzled by why ctcreator only sees a qt5 environment, a too old one even. It should be possible to convince qtcreator from the existence of the qt6 environment, shouldn't it?
Question is, how... -
I just tested it and it does not work. But I add it manually on Options->Kits->Qt Versions and click Add button to add qmake of qt6 with path. This is Ubuntu. Then switch to Kits tab and add DesktopQt6(or any name you like) manually. Click it and add Qt6 to it by selecting Qt Version to Qt6.4.1.
This is kind of messy and there may be a better way to do it. But it works. I just tested a small example and qt6 libs are linked to the executable. The example runs well.
Kit Qt6 not found with QtCreator because qmake of Qt6 is not defined in the PATH since qmake of Qt5 is the default one in the PATH
-
@JoeCFD My setup is slightly different it seems, I see no Options choice anywhere. But, in he Kit Selection dialogue box, if I hover with the mouse beside the "Qt 5.5.1 (System)"messages, a new button Manage pops up. Then comes a dialogue box, with, among others, a "Qt Versions" tab. In that tab, one can add (in my case) /usr/bin/qmake6), which then recognizes the correct Qt version (6.4.1 i my case).
It gives the option "Link with Qt", but that doesn'work in my case.
However, I can go further now.
The 5.5.1 maybe comes from one of the files in/under ~/.config/QtProject/, where I see various occurences of that version number.So something is not yet right here, but anyway, I can move on.
Thanks for your help! -
@Jogchum One step is missing in your settings. You have added to Qt 6.4.1. But no Qt6 kit is set.
Switch to Kits tab and press Add Button to add DesktopQt6(or any name you like) manually. Click it and add Qt6 to it by selecting Qt Version to Qt6.4.1.
Then use DesktopQt6 to build your projects. That is Qt6.