How do you configure Qt Creator to use both Qt4 and Qt5? - 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.

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

Related

It is possible to install qt 5.10 with qt creator 7+?

I've to recreate a work environment in a new pc and I would like to use the newest Qt Creator to work on a project that was developed in 5.10 but the maintenace tool does not allow to select that version:
I'm currently using windows 11, should I install Qt Creator 4.x that was shipped with 5.10 and then install the new Qt Creator over it?
it is actually possible to have what I would like to use?
I don't know why you are not seeing Qt 5.10 there, I do.
Anyhow, you can always install Qt Creator from an offline installer (https://download.qt.io/official_releases/qtcreator/ or from https://account.qt.io) and use the "Link with Qt" banner that is shown when you start that (if the banner doesn't show up, the same functionality is accessible via Tools > Options > Kits > Qt Versions > Link with Qt). Point that to the base directory of a Qt offline or online installer to make everything known to that Qt Creator installation automatically.

How to add Qt kits to Qt creator after installed?

I download the installer from the official site https://www.qt.io/download?hsCtaTracking=f24f249b-61fb-4dec-9869-50512342f8d9%7Cf3adf380-4740-4f7e-9e49-d06fa99445fa .
When installing Qt creator I skipped the Qt kit selecting step. Now I already installed Qt creator but cannot start any new project for Android because its kits selection step only contains a desktop option.
How to add Qt kits to Qt creator after installed? Or can only be solved by reinstall Qt creator? Please help.
Here is the installer view witch I skipped.
You can launch the same setup and install more features.
Also in the directory where Qt was installed there exists a Maintanance executable. Just start that one and you will get the setup wizard and the chance to add the android kit.

Why does Qt Creator need a kit for non-qt cmake project

I selected a Non-Qt C++ project from File->New, and then CMake for the build system, yet Qt Creator still insists that I specify a Qt kit.
I know for qmake projects you need a kit for the qmake, but why does it need it for cmake? The project itself won't use qt or qmake, I just want to use Qt Creator as the IDE. Also would specifying a kit make a dependency on Qt?
You are free to have kits in Qt Creator with or without Qt, with or without a C++ compiler, with or without cmake binaries, etc.
Qt Creator uses kits as a collection of things that are used together in (multiple) projects, so that you do not have to define these same settings again and again. The settings available in a kit depend on the plugins you have enabled and Creator is perfectly happy if some information is not set -- as long as this information is not needed by the project you are working on. So if you open a qmake-based project, creator will complain if a kit has no Qt version set (which is what provides the qmake binary). If you try to open a cmake-based project, then Creator will complain about Kits without a cmake binary set up. Kits are in no way limited to qmake projects, but does also apply to cmake, autotools, nim, python projects (and whatever else is supported;-).
For CMake projects the Kit defines the cmake binary to use, the Generator to use with that binary, default values to pass to cmake, the compiler used by the code model built into Qt Creator (and by the cmake project itself in newer Qt Creator versions), the Qt version that is used by the code model (and by the cmake project in newer QtC versions), the default environment the project will see when building and some more things.

qt creator on mac, missing project templates

I'm sure there must be a simple explanation, I have downloaded the latest sdk and installed it using default settings in 10.7.5. I've used QT on windows before so I know how to make a project, however when I try and make a project expecting something like this to appear:
http://doc.qt.digia.com/qtcreator/images/qtcreator-new-qt-quick-project-wizard.png
But this is what I actually see:
http://trollfx.com/qt_whatisee.jpg
There are no gui project available, also none of the samples are present on the welcome page. searching for them just does nothing. I'm completely stumped, can anyone advise please?
I had the same problem.
I think what you've done is you've downloaded QtCreator as a stand alone app, and you're missing the actual Qt base files.
Uninstall QtCreator and then go to http://qt-project.org/downloads and download Qt itself, which comes with QtCreator bundled with it.
Make sure you have correctly configured the directory where Qt is installed. It needs to know where to find the qmake utility. (Specifically, go to Preferences|Build & Run|Qt Versions, click Add and locate the qmake executable).
Btw, it is assumed that you have installed XCode (at least its Unix command-line development tools.) In contrast to Windows, the Mac version does not come with a compiler. You need XCode for that.

Symbian Qt Development Linux

I want to change to Ubuntu but I can't find a clear answer on if the latest Qt SDK for Linux will allow me to develop for Symbian (Like it does on windows)?
Check out Symbian development using Linux.
In short, it is possible since the Qt 4.7 release. You'll need to download the S60 SDK and a patch, then set up your environment to use the cross-compiler, all of which is described in the above link.
The official docs for Qt 4.8 are here: Installing Qt for the Symbian platform using Linux, and have more information on things like building signed packages.

Resources