Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you configure Qt Creator to use both Qt4 and Qt5?

Tags:

qt-creator

I download Qt Creator 2.7.0 (Based on Qt 5.0.2 (64 bit)). This seems to compile everything with Qt5.

I know you can download the Qt4 SDK, but then how can i configure projects to use Qt4 instead if I need to? Please provide detailed instructions. I'm on Ubuntu and not using any repository supplied Qt tools/libraries.

like image 871
gurpal2000 Avatar asked May 21 '13 10:05

gurpal2000


People also ask

Is qt5 Compatible with qt4?

Qt 5 is highly compatible with Qt 4.

How do I set environment variables in Qt?

You can edit existing environment variables or add, reset and unset new variables based on your project requirements. To globally change the system environment from the one in which Qt Creator is started, select Edit > Preferences > Environment > System, and then select Change in the Environment field.

Is Qt Creator cross-platform?

Qt Creator is a cross-platform IDE for C++ and QML. Qt Designer's GUI layout/design functionality is integrated into the IDE, although Qt Designer can still be started as a standalone tool.

What is qt5 creator?

Qt Creator is a cross-platform integrated development environment (IDE) built for the maximum developer experience. Qt Creator runs on Windows, Linux, and macOS desktop operating systems and allows developers to create software across desktop, mobile, and embedded platforms.


1 Answers

Answer: You download Qt4, compile it (if necessary) then in the menu Tools->Options->Build & Run->Qt Versions, you add Qt4 manually similar to the Qt5 config. You just need the path to the qmake file. Then go to the Kits tab in the same Options box, and add a manual Qt 4 Kit. You can change the Kit available to your app via the Projects tile and the Add Kit button. Add the Qt4 kit, remove the Qt5 kit, rebuild all. Simple.

ref: http://doc.qt.io/qtcreator/creator-targets.html

like image 155
gurpal2000 Avatar answered Sep 22 '22 14:09

gurpal2000