95

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?

Romário
  • 1,664
  • 1
  • 20
  • 30
Agrim Pathak
  • 3,047
  • 4
  • 27
  • 43
  • A "kit" is the compiler/linker you're going to use -- usually Visual C++ or Mingw on Windows. Setup instructions are here: http://qt-project.org/doc/qtcreator-3.0/creator-targets.html – MrEricSir Oct 22 '14 at 02:35
  • @MrEricSir I'm using Visual C++, which was auto-detected. The kit isn't showing any errors. – Agrim Pathak Oct 22 '14 at 03:10

11 Answers11

68

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.

GeneCode
  • 7,545
  • 8
  • 50
  • 85
Agrim Pathak
  • 3,047
  • 4
  • 27
  • 43
  • 2
    When I went to do this, I got a corrupted installation error :( Installing qt is no short task x.x Especially when you throw in source... Thanks for the tip though! – kayleeFrye_onDeck Feb 13 '16 at 00:12
  • 1
    Could you add more info about the Maintenance Tool please? – mm_ Apr 04 '16 at 18:08
  • @mm_ Sorry, I haven't used QT Creator in over a year. Maybe someone else can assist? – Agrim Pathak Apr 05 '16 at 00:31
  • 11
    @mm_ 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. – Sam Protsenko Apr 24 '16 at 17:39
  • 1
    @kayleeFrye_onDeck I got the feeling that I've seen much worse installation tasks. I wonder if that makes any ease but yeah that's how I feel anyway... hope you do alright – n611x007 Jan 21 '17 at 23:16
  • @SamProtsenko also make sure you select the right `Compiler:` before you clock `OK`, and also `Debugger:`. ho-ho-ho! + the `Desktop (default)` gets "red stop" or "yellow warning" icon sign prefix when it's not right and you can hover your mouse over them to see the message... – n611x007 Jan 21 '17 at 23:24
  • 1
    Thanks, @n611x007 -- I got this working eventually. Took some messing about in the settings. – kayleeFrye_onDeck Jan 23 '17 at 19:29
  • 1
    @kayleeFrye_onDeck glad to hear that! for the record probably worth: https://wiki.qt.io/MinGW lists which version of "MinGW" is used in which version of QT, ie. helps to find the right version of the compiler for yourself. "MinGW" turns out to be ambigous thing to say... – n611x007 Jan 24 '17 at 13:48
  • 1
    So this solution doesnt work cause qmake.exe its missing from my pc... apparently it comes somewhere else; why qt installer allows one to install the creator without whatever dependencies it needs without warning, this is dumb as hell – Ivan Castellanos Jan 30 '18 at 23:55
  • If you can't see anything on the Qt version combobox, make sure you add your version of Qt on the Qt versions tab. I've been able to solve the problem applying @SamProtsenko 's solution and taking this extra step. – SametSahin Dec 29 '18 at 15:25
  • Where is PATH thing? Where to select version? I think the ui is changed a lot. I don't even see "empty qt project option". – Omkar76 Nov 22 '20 at 12:24
  • 1
    Last time I had this problem I voted this answer up. This time I could not select any "qt version", there was just "none" available. So this time the following answer of @Joseph Tankoua solved the problem. First, I had to add qmake as described by Joseph, then I had to select it under "qt version".... – Anonymous Jun 08 '21 at 12:44
64

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

Community
  • 1
  • 1
mmdanziger
  • 4,466
  • 2
  • 31
  • 47
41

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:

  1. Execute in your terminal the command: sudo apt-get install qt5-default to install qt version 5.
  2. 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.
  3. Open your Qt-creator.
  4. Go to "Tools>Options" or "Outils>Options"
  5. Select the Qt Versions combobox and select and click "Add" or "Ajouter"
  6. 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.
  7. 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 ;)

Louis Langholtz
  • 2,913
  • 3
  • 17
  • 40
Joseph Tankoua
  • 542
  • 4
  • 11
  • 2
    this was a better guide to the qt-creator GUI than the accepted answer. To make it relevant for windows, install qt with pip (or anaconda) and run `find -name qmake.exe` in git-bash to figure out the location of your qmake file. (For me it was `~/Anaconda3/Library/bin/qmake.exe`.) – craq May 28 '20 at 04:15
  • I do not want to edit this (good) answer, but you need less steps: Find location of qmake: "which qmake". Then: "QtCreator -> Tools -> Options -> Kit (to the left) -> Qt Versions -> Manual -> File Dialog pops up -> Navigate to location of your qmake". That's it – Anonymous Dec 13 '21 at 10:18
7

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.

abcoep
  • 577
  • 9
  • 14
5

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.

Poikilos
  • 1,050
  • 8
  • 11
Archit Goel
  • 85
  • 1
  • 2
  • 26
    how to do so in Windows 10 – McLan Aug 16 '17 at 14:52
  • After installing qt5-default, on Qt Creator, start NEw Project, then when clicking on Options->Build&Run-> in desktop you have to select Qt version, then it will appear in the list –  Nov 26 '19 at 13:21
  • `E: Unable to locate package qt5-default` is what I get if I try to sudo apt-get install qt5-default. So I guess you guys here assume some preceding steps. Which ones? – BitTickler Jun 05 '21 at 03:03
4

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:

  1. 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).

  2. 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.

nae9on
  • 249
  • 3
  • 9
4

In my case, it goes well after I installed CMake in my system:)

sudo pacman -S cmake

for manjaro operating system.

Lyn
  • 521
  • 5
  • 5
1

Solution for Ubuntu [2023]

  1. Install qmake6: sudo apt install qt6-base-dev
  2. Open Qt Creator.
  3. Navigate to: Edit -> Preferences... -> Kits -> Qt Version
  4. Click "Add" button.
  5. qmake path: /usr/bin/qmake6 and hit "Apply" (otherwise it wouldn't be set)
  6. In Kits tab choose Desktop (default)
  7. Set Qt Version to the version you installed.

Done.

satk0
  • 170
  • 1
  • 9
0

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.

Amr
  • 411
  • 6
  • 21
0

on macOS: (as of 2021)

  1. brew install qt<latest_version> e.g. qt6
  2. 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`)
  1. Go to `Preferences -> Kits -> Qt Versions
  2. Click Add then navigate to /usr/local/Cellar/qt/6.0.3_2/bin
  3. Select qmake executable
  4. Go to Kits tab
  5. Select Desktop (x86-darwin.....) in the list
  6. Scroll down to Qt version dropdown box and select your newly installed Qt version.
  7. Click Ok.
puerile
  • 613
  • 1
  • 9
  • 18
0

I had solved this issue on my Linux mint , first :

  1. install qmake : sudo apt-get install qt5-default

  2. go to terminal and type qmake, you should get the path of qmake

  3. 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.

  4. Now the settings are done !!

Paul C
  • 25
  • 8
Mhadhbi issam
  • 197
  • 3
  • 6