If I try to open an existing project in Qt Creator I always get "No valid kits found".
I found a lot of Q&A around this, but on my installation I am not able to select a valid Qt version because:
In Build&Run->Kids->Desktop->QtVersion: None
I can not see any other entry in this field.
As already mentioned: It is a Fedora 25 x86_64 version.
Qt Creator gives in comand line:
Warning: No kit 'qt.57.gcc_64_kit' found. Continuing.
Is this a file which should exist somewhere? Can it be downloaded somewhere? Manual config seems to be not possible, because qt version can not be selected.
Is there any package which I did not have installed? Is there any meta package which I can use to get a valid installation?
What I have installed:
rpm -qa | grep qt5
dbusmenu-qt5-0.9.3-0.11.20150604.fc24.x86_64
qt5-qtbase-gui-5.7.0-3.fc25.x86_64
qt5-qtwebchannel-5.7.0-2.fc25.x86_64
qt5-qttools-static-5.7.0-3.fc25.x86_64
qt5-qtconfiguration-devel-0.3.1-2.fc24.x86_64
adwaita-qt5-0.4-3.fc25.x86_64
qt5-qtsvg-devel-5.7.0-2.fc25.x86_64
qt5-qtbase-common-5.7.0-3.fc25.noarch
qt5-qtlocation-devel-5.7.0-2.fc25.x86_64
qt5-qttools-libs-designer-5.7.0-3.fc25.x86_64
qt5-qtx11extras-devel-5.7.0-2.fc25.x86_64
qt5-qtserialport-5.7.0-2.fc25.x86_64
qt5-qttools-devel-5.7.0-3.fc25.x86_64
qt5-qtconfiguration-0.3.1-2.fc24.x86_64
qt5-qtwayland-devel-5.7.0-2.fc25.x86_64
qt5-qttools-libs-clucene-5.7.0-3.fc25.x86_64
qt5-qtlocation-5.7.0-2.fc25.x86_64
quazip-qt5-0.7.2-1.fc25.x86_64
qt5-qttools-libs-designercomponents-5.7.0-3.fc25.x86_64
qt5-qttools-5.7.0-3.fc25.x86_64
qt5-qtenginio-devel-1.6.1-2.fc25.x86_64
qt5-linguist-5.7.0-3.fc25.x86_64
qt5-qtwebsockets-devel-5.7.0-1.fc25.x86_64
qt5-qtconnectivity-devel-5.7.0-2.fc25.x86_64
qt5-qtsvg-5.7.0-2.fc25.x86_64
qt5-qtquickcontrols-5.7.0-1.fc25.x86_64
qt5-qtwayland-5.7.0-2.fc25.x86_64
qt5-devel-5.7.0-9.fc25.noarch
qt5-qtxmlpatterns-5.7.0-2.fc25.x86_64
qt5-qtwebkit-5.7.0-2.fc25.x86_64
qt5-qtserialport-devel-5.7.0-2.fc25.x86_64
qt5-qtaccountsservice-devel-0.6.0-2.fc24.x86_64
qt5-qttools-libs-help-5.7.0-3.fc25.x86_64
qt5-qtmultimedia-5.7.0-2.fc25.x86_64
qt5-qtimageformats-5.7.0-2.fc25.x86_64
qt5-qtsensors-5.7.0-2.fc25.x86_64
qt5-qtdoc-5.7.0-1.fc25.noarch
qt5-designer-5.7.0-3.fc25.x86_64
qt5-qtbase-static-5.7.0-3.fc25.x86_64
qt5-qtenginio-1.6.1-2.fc25.x86_64
qt5-qt3d-5.7.0-2.fc25.x86_64
qt5-qtbase-5.7.0-3.fc25.x86_64
qt5-qtdeclarative-devel-5.7.0-2.fc25.x86_64
qt5-rpm-macros-5.7.0-9.fc25.noarch
qt5-qhelpgenerator-5.7.0-3.fc25.x86_64
qt5-qtwebsockets-5.7.0-1.fc25.x86_64
qt5-qtconnectivity-5.7.0-2.fc25.x86_64
phonon-qt5-4.9.0-3.fc25.x86_64
qt5-qtscript-5.7.0-2.fc25.x86_64
qt5-qtwebchannel-devel-5.7.0-2.fc25.x86_64
qt5-gstreamer-devel-1.2.0-11.fc25.x86_64
qt5-qtaccountsservice-0.6.0-2.fc24.x86_64
phonon-qt5-backend-gstreamer-4.9.0-1.fc25.x86_64
qt5-qtscript-devel-5.7.0-2.fc25.x86_64
qt5-qtbase-devel-5.7.0-3.fc25.x86_64
qt5-qtx11extras-5.7.0-2.fc25.x86_64
polkit-qt5-1-0.112.0-8.fc25.x86_64
qt5-qdoc-5.7.0-3.fc25.x86_64
qt5-qtdeclarative-static-5.7.0-2.fc25.x86_64
qt5-qtwebkit-devel-5.7.0-2.fc25.x86_64
qt5-gstreamer-1.2.0-11.fc25.x86_64
qt5-qtdeclarative-5.7.0-2.fc25.x86_64
qt5-qtsensors-devel-5.7.0-2.fc25.x86_64
qt5-qttools-common-5.7.0-3.fc25.noarch
qt5-qtmultimedia-devel-5.7.0-2.fc25.x86_64
qt5-qtxmlpatterns-devel-5.7.0-2.fc25.x86_64
qt5-qt3d-devel-5.7.0-2.fc25.x86_64
I also develop with Qt Creator on Fedora 25, and it works for me.
Here is how I usually do it:
dnf install make gcc-c++ gdb
dnf install qt5*-devel
dnf install qt-creator
After this, I've got a working Qt Creator configuration on a fresh Fedora 25 (that I just installed from scratch yesterday).
To be honest, I'm not sure what you might have been doing wrong, but I have a few ideas:
Did you upgrade from a previous OS version or maybe copy the configuration of a previous Qt Creator version to your new installation?
Check that you have a compiler and build environment (make, gcc, ...) installed
If its configuration is corrupt, you could try deleting ~/.config/QtProject and Qt Creator might recognize your stuff.
Try to delete the *.pro.user file of your project if it may have been generated by a previous Qt Creator version
In any case, you can fix the configuration relatively easily.
Go to Tools -> Options
Select Build & Run
On the Compilers tab you should see your installed compiler in the auto-detected section. If you have a compiler installed but it isn't recognized, add it here manually.
On the Qt Versions tab, the version I installed from the Fedora repo (currently 5.7.0) appears in the Manual section (even though I didn't add it manually). You can add it by browsing to /usr/bin/qmake-qt5.
On the Kits tab, I have a single Manual entry called Desktop, which is basically set to use the compiler and Qt version mentioned above.
I got it:
qtcreator was not able to find my qmake installation, because in the fedora packages qmake is:
-rwxr-xr-x. 2 root root 2921520 19. Jul 14:51 /usr/bin/qmake-qt5
Adding a softlink to
lrwxrwxrwx. 1 root root 18 5. Dez 17:17 /usr/bin/qmake -> /usr/bin/qmake-qt5
did NOT help!
You have to point to the correct qmake via :
Build&Run -> Kits -> Manual -> Desktop -> Qt-Version -> Manage -> "Select qmake with file-browser"
Now it seems to find a qt version.
In "Details" the dialog prints "Qt version 5.7.0 for Desktop"
Why there is not a simple output: "Can not find qmake"?
OK, seems to be a bit special to fedora which install qmake to different file name.
Based on #SteeveDroz comment that worked for me on Fedora 29:
Remove the path to the shell script and select /us/bin/qmake-qt5.
Now it doesn't complain about the wrong version.
The "No valid kits found" error can be caused by many things (e.g. missing g++ compiler). Here's a video I just uploaded that shows a clean install of Qt 5.13 on a clean install of Fedora 30 KDE:
https://www.youtube.com/watch?v=DQKoNwg5afU
Related
I build Qt 5.9.1 from sources, downloaded from www.qt.io, on Ubuntu 16.04.3. I use -make examples for configure script when I build Qt.
After installation in default prefix /usr/local there is a /usr/local/Qt-5.9.1/examples/ and /usr/local/Qt-5.9.1/doc/.
Also I have installed Qt Creator 4.3.1 from the official site.
On the "Welcome" page of Qt Creator in "Examples" I see auto-detected "Qt 5.9.1 in PATH (Qt-5.9.1)" entry in combobox (on another installation I even don't see this entry - combobox is empty). And no one icon of the examples itself. Typing any sensible keywords into search box does nothing.
When I open my (perfetcly buildable) project and hit F1 on any Qt class name, I expect to see a help on it in the right split window. Then nothing happens, but only "No documentation avaliable." text is shown.
qmake of installed Qt is in the PATH and there is QTDIR=/usr/local/Qt-5.9.1 in /etc/environment.
How to make Qt Creator to see docs, examples and demos from auto-detected Qt installation?
In case someone installed qtcreator from the Ubuntu packages the examples can be installed in the following way:
sudo apt-get install qtbase5-examples qtbase5-doc-html
This will show the basic widget examples.
Additional examples (e.g. qt quick) can be added by installing them explicitly:
sudo apt install qtquickcontrols2-5-examples
To actually get them displayed in qtcreator I had to install:
sudo apt install qt5-doc qt5-doc-html
Edit:
Also make sure to install the qml modules you need, for example:
sudo apt install qml-module-qtquick-controls2
Select Tools → Options → Help → Documentation in Qt Creator and add *.qch files from /usr/local/Qt-5.9.1/doc/ (and possibly from /usr/local/Qt-5.9.1/examples/ ?).
I have searched all day in order to use Qt 5.4 or Qt 5.5.
I have two machines, one running Ubuntu 15 and the other Ubuntu 14, but got the same results.
I have installed the program through the download-online package, and now I have beautiful /opt/Qt/5.4/ and /opt/Qt/5.5 folders.
That's all. I am stuck in here. If I run qmake -version, the reply is:
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu
Also, if I run qtchooser -list-versions, I get:
4
5
default
qt4-x86_64 linux-gnu
qt4
qt5-x86_64 linux-gnu
qt5
I have to use SuperCollider 3.7 for an important project, and I need Q t5.4 or higher. Is there anybody who can tell me what to do after installing the package to make programs see Qt 5.4 or higher?
I even tried to build from the source code, but in that case init-repository doesn't work.
Luca
I have had the same problem different times, therefore my late answer.
You should create the file /etc/xdg/qtchooser/default.conf, and put the path to the bin and lib directory, for example:
/opt/Qt/5.5/gcc_64/bin
/opt/Qt/5.5/gcc_64/lib
Now this is the default configuration, and it is shown with qtchooser -l as such.
See man qtchooser:
/etc/xdg/qtchooser/*.conf
System-wide configuration files. Each has two lines, the first is the path to the binaries and the second is the path to the
Qt libraries. If a default.conf is provided, the settings from it will be automatically used in case nothing else is selected.
Launch any version of Qt Creator. It can be either the old one from previous install or the newer one.
Go to Projects/Manager Kits and add kits in which you are interested (Qt 5.4, 5.5 or the one which is install by default)
Open any project, code and build with any of the specified kits.
As I was digging in the right way to change the default choice for qt session in my old ubuntu 14.04 LTS, I did find this old topic as best match for my own question.
So here my answer for any 14.04 living in 2019 : the default package qmake point on qtchooser, which looks for its conf in /usr/lib/x86_64-linux-gnu/qt* directories
The default conf is in /usr/lib/x86_64-linux-gnu/qt-default/ .
If you haven't this, look at your "qtchooser -print-env" result to see what's your own path. I think that a good practice to set this as system default should be to create a link from the xdg default to your ubuntu standard default (as it works for me) :
sudo mkdir -p /etc/xdg/qtchooser/
cd /etc/xdg/qtchooser/
ln -s /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf default.conf
As far I can see, there's no more things as "Managers Kits" in qtcreator
Coming from Ubuntu I bought a new iMac and tried to setup my Qt development. Everything else is already up and running. Xcode command line tools are also installed.
Because it surprised me how good brewand brew caskworked I wanted to install Qt5with them. On the one side it is very fast and I do not have to got to any homepage in order to download it. On the other side I do not have to care about the installation directory. Having multiple version installed should also be a lot simpler though.
I used the following commands:
brew install qt5
brew cask install qt-creator
Qt5 is now installed under /usr/local/Cellar/qt5/5.4.1. I also added the bin folder to my path (done in .bash_profile). QtCreator, Linguist and all the other applications are shown in my launchpad. But unfortunately, it is still not done.
QtCreator says that no version of Qt is known. I tried to add qmake but I was not able to navigate to the folder mentioned above.
Could anybody give me a hint on how to fix this issue? Installing qt via installer should be the last option.
I had similar issue with Qt Creator, now on Mac GUI applications do not have access to environmental variables (in previous versions it was different).
You need to setup path to qmake in Qt Creator manually using Command-Shift-G in Finder to navigate to Folder you need.
Another option is to use brew link qt5 --force, which will symlink the various Qt5 binaries and libraries into your /usr/local/bin and /usr/local/lib directories. This will give you qmake at the command line, without requiring you to add anything special to your path in .bash_profile. The main reason this isn't done by default is that Qt4 is also somewhat popular.
It could get a little messy, but if you need to install Qt4 as well, you can unlink Qt5 at any time, by doing brew unlink qt5, and it will keep the installation intact. Then do brew install qt to get Qt4, which unlike the brew installation for Qt5 will indeed create the links directly into /usr/local without you having to manually do brew link qt. You can unlink Qt4 and relink Qt5 (or vice-versa) whenever you need to switch.
In my cases I needed to set it in Preferences => QT Versions => Add. Environment variables also did not help. Small popup when starting app also did not work.
I use command like this:
brew install qt#5
and. success install qt5 by brew.
When I hit F1 while the cursor marks a classname in the source code, I get the message on the right side of my IDE: "No documentation available."
How can I fix this?
I run Qt on Linux Mint 17.1 and I'm just getting familiar with Linux :-)
Thank you.
As #WCoder suggested, run:
rm -fr ~/.local/share/QtProject* ~/.config/QtProject*
In addition, install Qt, the latest version of which is 5.5.1 at the time of writing this post: https://download.qt.io/official_releases/qt/5.5/5.5.1/
In Qt Creator, go to Tools → Options → Help → Documentation and add all the *.qch files in ~/Qt5.5.1/Docs/Qt-5.5 and the one in ~/Qt5.5.1/QtWebView/1.1/ (assuming you installed Qt into your home directory, ~/ ).
I had a strange problem (freeze after start QtCreator) and I got it fixed after remove the diretory ~/.config/QtProject
May be this is a problem too: ~/.local/share/QtProject
You can reload the help files with the qtcreator options.
In case QtCreator was installed from a system repository via sudo apt install qtcreator then one will need sudo apt install qt5-doc to get IDE's integrated help files.
I installed qtcreator on a Ubuntu 11.10
sudo apt-get install qtcreator
the versions installed are: QT Creator 2.2.1, QT 4.7.3
When i start qtcreator, to explore QT C++ examples the button is greyed out/disabled and it says Examples not installed.
Neither does qtdemo show any demo/documentation?
Do i have to install examples, doc separately? If yes, how?
How can i enable examples in qtcreator and documentation in qtdemo?
EDIT:
In response to one answer below from #Murtuza Kabul, I tried many things to point qtcreator to correct qt but could not. So I did uninstall qtcreator and qt-sdk and reinstalled qt-sdk. So now qtcreator is what comes with qt-sdk . It still says examples not installed.
I downloaded Qt 5.1 directly from qt-project.org and installed as admin (with sudo) on Linux Mint 12 (based on Ubuntu).
If I started qtcreator as normal user I didn't have examples but if started qtcreator as admin (with sudo) I had all examples.
My problem was with examples folder privilages. It was the only folder without read/execute privilage for all users (/opt/Qt5.1.0/5.1.0/gcc/examples). All other folders inside (and outside) examples had privilages for all users.
EDIT:
I forgot to say - as HostileFork mentioned in comment - sudo chown -R +rx /opt/Qt/5.1.0/gcc/examples was solution to this problem.
EDIT:
As noted by Climax - it should be chmod instead of chown
sudo chmod -R +rx /opt/Qt/5.1.0/gcc/examples
You also need to install qtsdk. It comes with the examples and binaries required to run the qt project. If you install the sdk, it will provide you an interface to update the sdk and install/uninstall different parts of the sdk whereby you will be able to choose if you want to install the examples or not
Install the qt4-demos package.
sudo apt-get install qt4-demos
I found the sample code installed in /usr/lib/qt4/demos/. Also the qtdemo program was installed at /usr/lib/x86_64-linux-gnu/qt4/bin/qtdemo.
It seems only a limited set of examples are installed by this package.
I had the same problem on Windows 7.
How I solved this:
I open QT Creator.
I select menu-option [Tools]
From there I select [Options...]
From there I select the [Kits] option on the left-hand side
I select the tab [QT Versions]
I click The [Add...] button: to add the QT version that I am using...
... I am presented with a windows-explorer screen to select something...
... I go to the main directory on which QT is installed (in my case: C:\Qt)...
... In the explorer "Search" I enter qmake (without the quotes)...
... There is a single qmake EXECUTABLE file displayed - I double-click it!...
... I press [Apply], then [OK].
Walla - it works! I now have examples!