Qt Creator: No documentation available - qt

I have installed Qt Creator 4.10.2 on Fedora 31 (KDE), using the standard 'dnf install'. Everything seems to work fine, except one thing: the documentation. When I highlight a Qt class (e.g. QApplication) and then press F1, I get the message "No documentation available". However, when I go to Tools > Options > Help > Documentation, I see six entries:
org.qt-project.qtcmake.5132 (auto-detected)
org.qt-project.qtcmake.600
org.qt-project.qtcreator.4102 (auto-detected)
org.qt-project.qtdoc.5132 (auto-detected)
org.qt-project.qtdoc.600
I have looked at the other StackOverflow questions relating to this issue, and they don't seem to answer my question. Does anyone know what I have to do to get the documentation in Qt Creator?

You are not alone!
You probably need to install a couple of additional rpms. The QApplication class belongs to the 'Qt Widgets' module, which would appear in your help configuration as:
org.qt-project.qtwidgets.5132 (auto-detected)
Linux vendors like Fedora usually divide library documentation in several RPM packages. You need to guess which ones you are interested and install them as needed. QtWidgets is probably packaged together with other modules in a qtbase package like this one (which is for Qt 5.12.3, but you seem to be developing with 5.13.2). Sorry, I don't have a Fedora installation at hand right now. Please try to search the available RPM packages yourself. Good luck!
I tend to not use the Qt packages provided by the Linux vendors. For me, it is much more convenient to use the qt online installers. You may install several releases side-by-side on your $HOME and you will get the full documentation and examples for each one. There are newer versions than the ones available on Fedora repositories. You may install v5.14.1 right now and try it on your software.

I ran into the issue (9/2022) as well and was able to do the following on Redhat 8 to install all documentation for qtcreator:
% sudo yum install qt5-doc

Related

Where is the Qt binary file?

I'm on Manjaro based on Arch Linux.
I searched everywhere, and I cannot seem to find that binary file.
Searched /usr/lib/qt, used find and which commands, etc.
The only might-be relevant thing I found is in /usr/lib/qt6/bin/, I found a binary file called "qt-cmake". But I'm pretty sure that's not what I'm looking for.
My final goal is to install the latest release version of Qt Creator on GitHub, and installation needs to know the paths of two binary files :
Qt
Llfw
Installation guide precisely says "These instructions assume that Ninja is installed and in the PATH, Qt Creator sources are located at /path/to/qtcreator_sources, Qt is installed in /path/to/Qt, and LLVM is installed in /path/to/llvm."
There is no "Qt binary file" per se. Qt is a framework, delivered as a (large) group of libraries and header files.
The Qt installer should provide you with everything you need. I'm not sure this link will work for you, but...
Qt Installer
As an aside, Qt Creator is an IDE for building and testing Qt-based applications. It isn't clear to me why you'd need the sources for that.

Run Binary With Specific QT Version - Cannot mix incompatible Qt library

I'm trying to replicate an application that we currently have running on a physical Ubuntu server using an Ubuntu machine in Virtual Box. It is a QT application but on the server we are running it using pm2 from NPM. After installing QT, and installing drivers needed for the application i've tried to run it but keep coming across this error:
Cannot mix incompatible Qt library (version 0x50701) with this library (version 0x50905)
I've inherited the code from someone else and don't want to change the project to QT5.9.5, so i'm trying to run with 5.7.1, I've followed instructions on other questions in order to change the QT version to 5.7.1 but still get the same error when running it.
I followed the instructions here:
https://unix.stackexchange.com/questions/116254/how-do-i-change-which-version-of-qt-is-used-for-qmake
When checking the QT version using "qmake -v" in the console I get the following output:
QMake version 3.0 Using Qt version 5.7.1 in /home/sam/Qt5.7.1/5.7/gcc_64/lib
So although it looks to me like i'm using the desired version of Qt (5.7.1), i'm still getting the incompatible library issue, i'm very new to all of this so apologies if this is a stupid question. If anyone could tell me what to do in order to use the compatible library that'd be great, thanks.
I will try to explain this in steps!
Each complete set of Qt libraries is called a Qt "distribution". You can get Qt distributions from a variety of sources:
Installed from the package manager of your OS (.deb/.rpm).
From a downloaded zip file on http://qt.io
As a cloned repo from git
etc..
Some of the available Qt distributions will come pre-built, and some will need to be built from sources. In either case they will all have a qmake program that is specific to that particular Qt distribution. This program is responsible for building programs so that they link to the particular Qt distribution that the qmake is part of. qmake is also used when building with QtCreator.
If you have a binary built with one qmake and you try to run it on another computer, it might find the wrong Qt libraries during dynamic linking and spit out errors of "incompatible version of Qt".
There are many solutions to this problem;
Collect all the Qt libraries (Mine are in /home/myusername/Qt/5.version/gcc_64/lib/*.so) in the same folder as your program executable. This will make sure they are prefered to any other version of Qt that may be in your dynamic linker's path.
Uninstall the OS supplied Qt version(s). This may not be advisable especially if other programs use them.
Rebuilt your program from source using the correct qmake.

GDB with QtCreator cannot read variables

I have tried to setup QtCreator with Qt 5.9.5 on my new ubutnu 18.04 and have been met with spades of problems. Right now my issue is that certain variables cannot be read by GDB when trying to debug a project. I have already tried tinkering with GDB setting in QtCreator with no success, and now I think my issue is that I do not have the debugging symbols installed for Qt( As mentioned here: https://bugreports.qt.io/browse/QTCREATORBUG-8278)
However when I search for debugging symbols via apt-get search I can see "qt4-bin-dbg - Qt 4 binaries debugging symbols" ( Which I installed ) but nothing for Qt 5. This link : https://packages.debian.org/sid/qtbase5-dbg suggests that it should be called qtbase5-dbg but this also does not exist.
So, does anybody know how I can download the debugging symbols, or any alternative fix???
This answer summarizes the content of the comments above.
Since Ubuntu Zesty, debug symbols for Qt5 are not distributed anymore. More details can be found on askubuntu here.
That is, there was indeed a qtbase5-dbg package, that is not available since Zesty.
Hence the solution is to use the Qt SDK as provided by the Qt company at http://download.qt.io/official_releases/qt/.
Alternatively, you can also download the sources and compile the Qt packages yourself. Using the Qt sources while debugging can be helpful if you experience bugs in the Qt framework itself.

Cross-compiling QtDeclarative for raspberry pi

I'm trying to cross compile qml for Raspberry pi 3 on a x64 Ubuntu.
I followed this tutorial
https://wiki.qt.io/RaspberryPi2EGLFS, installed Qt 5.6.3 and managed to run QtWidgets applications pretty easily and I'm now looking to use QML.
From what I understood, I need to install qtjsbackend and qtdeclarative for it to work so I cloned the github repositories and installed qtjsbackend without any trouble.
now, when I tried to run qmake on qtdeclarative, I got some weird errors:
/home/myname/raspi/qtdeclarative/src/src.pro:13: 'qtConfig' is not a recognized test function.
It keeps going on until:
Reading /home/myname/raspi/qtdeclarative/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro
Project ERROR: Unknown module(s) in QT: qmldebug-private
I can't find anything on the internet about this, does anyone have an idea of what to do ?
The qtjsbackend requirement is old, and only needed for Qt 5.1. Newer qtdeclarative no longer use v8 as a JavaScript engine.
The error you are getting there is caused by a mismatch of version dependencies. You are trying to build a qtdeclarative that looks like it is from either a 5.8/5.9 or dev branch against a qtbase that you say is 5.6. If you have Qt 5.6, you want to build the same major & minor version for qtdeclarative, i.e. 5.6 (or a 5.6.x release)
I would suggest that you either use qt5.git to get you all the dependencies of the version that you need, or use the tarball releases which contain everything in one "blob".
Alternatively, you should be able to install it from your distribution. I would expect that it is already packaged there, though it may not be the newest version possible.
I faced same problem and tried following
Try checking out 5.7 branch from your git repo for qtdeclarative,
git checkout 5.7
then qmake, make and make install.
Hope this helps.
Cheers

Get Qt5 up and running on a new Mac

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.

Resources