QtCreator: No valid kits found - c++

Installed just the IDE on Windows 7. I want to create a Plain C++ Project (Non-QT Project); however I get an error: No valid kits found. When I click on Options->Kits, I see the Desktop (default) kit, and it shows no errors.
Am I getting the error because I didn't install a Qt library? If so, is there any way I can bypass downloading/installing that and just use the IDE?

Found the issue. Qt Creator wants you to use a compiler listed under one of their Qt libraries. Use the Maintenance Tool to install this.
To do so:
Go to Tools -> Options.... Select Build & Run on left. Open Kits tab.
You should have Manual -> Desktop (default) line in list. Choose it.
Now select something like Qt 5.5.1 in PATH (qt5) in Qt version
combobox and click Apply button. From now you should be able to
create, build and run empty Qt project.

Though OP is asking about Windows, this error also occurs on Ubuntu Linux and Google lists this result first when you search for the error"QtCreator: No valid kits found".
On Ubuntu this is solved by running:
For Qt5:
sudo apt-get install qt5-default
For Qt4:
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
This question is answered here and here, though those entries are less SEO-friendly...

No valid Kits found
The problem occurs because qt-creator don't know the versions of your qt,
your compiler or your debugger.
First off, let's solve the Qt versions. It may normally solve the others too ;).
You try to create a new project, run select a kit and then there is no kit available in the list.
Follow the steps:
Execute in your terminal the command: sudo apt-get install qt5-default
to install qt version 5.
Verify the version of your Qt and the location of your qmake file. Do this by executing in your terminal the command qmake --version.
You may have a result similar to this line.
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu. What's important here is the location /usr/lib/x86_64-linux-gnu.
Open your Qt-creator.
Go to "Tools>Options" or "Outils>Options"
Select the Qt Versions combobox and select and click "Add" or "Ajouter"
Then find the qmake file in the location of step 2. Here /usr/lib/x86_64-linux-gnu/qt5/bin/ here you have the qmake file for qt5. Open it, click Apply.
Go to "Kits" combobox. Select Desktop(by default) or Desktop(par défaut). Then scroll down to the button to select Qt version: and list down to select the version you just add.
8.Then apply all. Check your compiler and debugger and it's ok. You're done.
Yes I ...
Hope it's help ;)

In my case the issue was that my default kit's Qt version was None.
Go to Tools -> Options... -> Build & Run -> Kits tab, click on the kit you want to make as default and you'll see a list of fields beneath, one of which is Qt version. If it's None, change it to one of the versions available to you in the Qt versions tab which is just next to the Kits tab.

For QT 5.* if you face error at Kits, like No Valid Kits Found, go to Options->Build&Run-> (Kits tab) then you see a Manual category which should list Desktop as the default.
Just go to your OS Terminal and write sudo apt-get install qt5-default, go back to QT Creator and Start your New Project, and there you see the kit option Desktop included in the list.

I had a similar problems after installing Qt in Windows.
This could be because only the Qt creator was installed and not any of the Qt libraries during initial installation. When installing from scratch use the online installer and select the following to install:
For starting, select at least one version of Qt libs (ex Qt 5.15.1) and the c++ compiler of choice (ex MinGW 8.1.0 64-bit).
Select Developer and Designer Tools. I kept the selected defaults.
Note: The choice of the Qt libs and Tools can also be changed post initial installation using MaintenanceTool.exe under Qt installation dir C:\Qt. See here.

In my case, it goes well after I installed CMake in my system:)
sudo pacman -S cmake
for manjaro operating system.

Another way to solve this issue (I did it on Ubuntu 16.04 but it might also work for windows and other Ubuntu versions):
While going through the installation steps, when you reach the step where you choose which packages to install via check boxes, instead of just pressing next with the default "Tools" checkbox selected also check the box for the version of QT you would like in addition to the "Tools" box. I usually check the first box which is the latest version of QT.
After doing this you should not see the "no valid kits found" issue described in this thread.
Happy Coding.

on macOS: (as of 2021)
brew install qt<latest_version> e.g. qt6
qmake --version will output:
QMake version 3.1
Using Qt version 6.0.3 in /usr/local/Cellar/qt/6.0.3_2/lib
(This is the path to the QT installation --> `/usr/local/Cellar/qt/6.0.3_2/lib`)
Go to `Preferences -> Kits -> Qt Versions
Click Add then navigate to /usr/local/Cellar/qt/6.0.3_2/bin
Select qmake executable
Go to Kits tab
Select Desktop (x86-darwin.....) in the list
Scroll down to Qt version dropdown box and select your newly installed Qt version.
Click Ok.

I had solved this issue on my Linux mint , first :
install qmake : sudo apt-get install qt5-default
go to terminal and type qmake, you should get the path of qmake
create a new project (application widget type ), when you reach
the kits part you should find desktop list item, click manage then
go to the kits tab bar and scroll down until you find a drop-down called
Qt version, click manage and paste the path there then submit.
Now the settings are done !!

Related

Why my QtRPT project file is not running in QtCreator?

I have QtRPTProject to run in the QtCreator but It is showing errors like " Cannot run compiler 'g++'. Maybe you forgot to setup the environment?" and "Project ERROR: Unknown module(s) in QT: script" while building.Any help ??
Project ERROR: Unknown module(s) in QT: script
This means that the module Qt Script is not installed.
This module has been deprecated and is not installed by default, you have to opt-in.
The exact procedure on how to install it depends on how you installed Qt in the first place. If you used the online installer, it is just a matter of running the "Maintenance Tool" and checking the Qt Script checkbox.
Cannot run compiler 'g++'. Maybe you forgot to setup the environment?
This means that Qt Creator cannot find the c++ compiler.
That means that you have not installed a compiler, or not configured Qt Creator correctly.
Again the exact procedure depends on your system and which compiler you want to use. If you are on Windows, the Qt Maintenance Tool offers to install MinGW for your. Like for Qt Script it is just a matter of checking the right checkbox. Be sure to select the MinGW version that matches the version of Qt you selected.
If you need more help, please edit your question and add details about your system and your current installation.

What should I change in Qt creator to compile using MinGW rather than microsoft compiler

Currently my qmake command in QtCreator looks like this:
qmake.exe D:\programing\myproject\myproject.pro -r -spec win32-msvc2010 "CONFIG+=debug"
Now I do not like the win32-msvc2010 because Microsoft compiler sucks horribly doesn't support C++0x.
So what configuration do I change to use MinGW instead of Microsoft compiler when compiling desktop Windows application?
I walked through the settings and googled but no hints...
Easiest thing to do would be to go here:
Link to Qt downloads page
Scroll down and select Qt 5.6.0 for Windows 32-bit (MinGW 4.9.2, 1.0 GB) this will download the installer (its about 1 GB). Run it and choose all the default options. Then you will have Qt 5.6 with mingw and Qt Creator all setup ready to go.
Note: Before you start that its probably best to delete your current version - if you are not attached to it in any way :)
If you want to change your current setup, then it might be longer-winded to find out what you are missing for mingw. For example you need the mingw qmake (and all the other stuff under the mingw_32 folder) file that would be located here (using default install options):
C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\qmake.exe
to create your "Qt Version" part of the kit. And the actual mingw compiler, which is located here (using default install options):
C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\g++.exe
to create your compiler. Once you have both of these then you can put them together to create your new kit.
But to just add a compiler all you need to do is:
Click compilers tab
Click add and select mingw
A new compiler is added, click it
You will see some options below, add your compiler executable path in (like the one above for example).
And you are done - there are some other options, but you probably don't need to use them.
note my paths are for qt 5.5.1 (obviously) so slightly different to 5.6 :)

Can't create console application project in QT creator - No valid kits found

I already add a kit in Tool->Options->Kits->ADD
and when im trying to create a console application it says "No valid kits found"
Click the Option hyperlink (or Tools --> Options) in the Kits tab, select the Desktop (default) entry below the Manual. You will see that the Qt version is blank, click the input control and select the right qt version and Apply or OK.
QtCreator did not find and tool chains.
Use the Qt Online Installer for Windows to install MinGW or MSVC tool chains.
If your qt sdk is x64 you need to install x64 mingw compiler. If not than install i686 mingw for compiler. Here is good guideline which you can learn how to install qt creator, qt sdk, and mingw for w8.1 machines.

Multiple Qt versions on Linux

I am currenyly using Debian Jessie and I have Qt Creator installed with Qt 5.3.3. It works fine, however there are some issues like QSystemTrayIcon not appearing properly, which I understand doesn't occur on versions earlier than 5.0.0, so I would like to be able to switch which version I am building with. Where can I download the necessary files that I can then point to from the Qt Versions tab in Qt Creator? Currently I can only choose 5.3.3. I would need something like 4.8.6 too.
You can install the Qt 4 development package, libqt4-dev, using your package manager. If you need a different version, you'll need to build it yourself from one of the source packages in the Qt Project's archive. Make sure to set an install prefix outside of your usual /usr, unless you know exactly what you're doing. Usually the prefix /opt is used for this kind of thing.
After it is installed, you can try restarting Qt Creator, and see if it is picked up automatically. If not, you can add it manually by creating a manual Qt version and pointing it to /usr/bin/qmake-qt4 (or something like /opt/qt-4.8.6/bin/qmake if you built Qt yourself and installed in the prefix /opt/qt-4.8.6). You then need to set up a "Kit" as well, and then you can add a "Kit" to your project build configuration (on the projects tab in the main window).

Qt on beagle bone black (full install not cross-compile)

I want to use qt on beagle bone black same as we use on desktop without "cross compiling" and "tool chain" stuff. I already done this for raspberry pi running raspbian wheezy using
apt-get install qtcreator
command. I searched on google and found something called qt embedded for BBB. I followed
opkg update
opkg install qt4-embedded --force-depends
opkg install libqtcoree-dev libqtguie-dev
instructions and installed qt embedded on BBB running Armstrong on it.
Now i have a project developed on my desktop in qt creator and i want to build it on BBB. I am searching for this from last two days with no success, all i found eveywhere is "cross compile" and "tool chain". Does anyone knows how to build qt project on BBB natively (whether it is possible or not?)?
I copied my folder containing qt project on Armstrong desktop.
Then i go in directory
cd Desktop/DisplayPara
and tried
qmake DisplayPara.pro
it only shows somthing like this
sh: -d:command not found
sh: -d:command not found
I tried
qmake -project DisplayPara.pro
which also end up with same error. I don't know what's going wrong ? any help, suggestions will appreciated. Thanx...
I didn't have any luck with those instructions either.
I removed all Qt packages and did:
opkg install qt4-embedded
opkg install qt4-embedded-dev
Then in the directory with my application I did:
source /usr/share/qtopia/environment-setup
qmake -project
qmake
make
Exit gnome (or other desktop). I just use Ctrl-Alt-F1 to get to a console window.
Then run:
./myapp -qws
The -qws flag makes the application run under its own Qtopia server.
I would like to be able to run under the Gnome desktop environment, but this is the only way I could get something that works.
Hints welcome.