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

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.

Related

Can not set android clang compilers for Qt Android on Ubuntu

I installed Qt Android 5.15.2 on Ubuntu but there is problem with the compilers. This is what I have set:
And here is what QtCreator detects as compilers:
The first error is displayed here in the Qt version tab:
and also in the Kit tab I see this errors no matter which compilers I set from the available:
Why I got this errors? Can please someone that has android kit on Ubuntu already set, tell me which compilers is using and which paths are for the compilers?
I will add more information for the current compilers or kits if needed.
The problem is that you are trying to use a x86 compiler for Android. You need to install the specific compiler from the Android SDK/NDK. So the good news is that you might be only missing one step (step 2 below)
I tried to install from the Ubuntu stock packages. That was impossible to get to work.
I was able to set it up in the following way:
Download the Qt online installer. Login and DO NOT choose individual packages, install Qt for desktop and Qt for mobile (check the last 3 options). This will install Qt 6 + QtCreator
Run QtCreator after everything finishes (+1.2Gb download). Go to Tools>Options>Devices>Android. Check that Java SDK is ok. On the Android section, choose "Set up Android". Accept all licenses.
This is what you should see in the end:

How to configure QT creator in Mint Linux

I need to write Linux software for labs. Put on Virtual Box Mint (wrote that it is best for beginners fit). Installed QT Creator, like all the files needed downloaded. But in the end I still can not create a project.
Qt Creator is just the editor.
You still need to have at least one version of the Qt framework installed - either from an installer, built from source or from a package manager.
The installer bundles a copy (non optional) of Creator, configured to use it.
If you build from source you will have to add the Qt version (профили Qt) and make a kit (комплектьi) from it and a compatible compiler.

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 :)

QtCreator: No valid kits found

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 !!

qmake on a mac missing for qt-creator

I am working on Mac OS X at the moment, and wanted to start building apps using Qt Creator.
Unfortunately i can't build any applications as it gives me an error saying that qmake's path is not found or qmake is missing.
I tried using netbeans, which works perfectly with simple c/c++ programs, but for qt apps it then gives me the same error.
My version of Xcode 4 works perfectly and builds without any problems.
Any ideas?
Thanks :)
It is not enough to just download the Qt Creator, you need to download the complete sdk: http://qt.nokia.com/downloads (almost 1GiB)
My Macbook is no longer my primary computer. But, when it was, I found out through painful experiences that it was best to install software from MacPorts whenever what you wanted was available from http://www.macports.org/
Even more important, I also discovered that when software was not offered from MacPorts, it was invariably because that particular software did not install without some sort of tweaking on a Mac. Hence, since Macports does not currently offer Qt v5, and I had problems installing the qt-project.com Qt v5.2.1 SDK on my Macbook, I would advise to go with the MacPort for Qt v4.8.5 [qt4-mac] which includes qmake. Qt Creator is available as a separate MacPort [qt4-creator-mac].
Here is how I successfully installed Qt v4.8.5 [with qmake] and Qt Creator on my Macbook:
1) 'sudo port install qt4-mac'
2) 'sudo port install qt4-creator-mac'
3) I used Finder to run Qt Creator which was in the /Applications/MacPorts/Qt4 folder.
4) When I first ran Qt Creator, its Preferences dialog listed the auto-installed Desktop kit, but that kit had no Qt version, no qmake, and no debugger.
5) Manually added a second kit.
6) Configured kit's Qt version for /opt/local/bin/qmake, which is where qt4-mac installed qmake. This was enough for the kit to now discover Qt v4.8.5 which had been installed by qt4-mac.
7) Used kit's auto-detect feature to now discover the debugger.
8) Configured that kit to be the default kit.