Only kit Qt5.5.1 found with QtCreator
-
@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.