Skip to content
Advertisement

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.

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement