Qt

Getting and Building Qt Creator

TODO: This should be extended.
* How to avoid building Qt
* Windows specific hassle, see README in \QC sources

There are several reasons why you might want to do your own build of Qt Creator, like using the most current development version and being able to tweak Qt Creator at one or the other place. It is also necessary if you want to create your own Qt Creator plugin.

Getting and Building Qt

Qt Creator usually uses the latest stable release of Qt, you can see the exact minimum requirement at the top of Qt Creator's qtcreator.pro. (You can find the current version in our source repository here: http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/qtcreator.pro.)

You find the sources for the different Qt versions for example on our gitorious repository http://qt.gitorious.org/qt.

Qt Creator requires private headers of Qt, which are unfortunately not installed by the Qt binary packages, and also are not copied to the installation directory when using make install on a self-compiled Qt. To solve this problem configure Qt with the -developer-build option, which sets the install directory to the build directory itself (you are not required to run make install in that case). In Linux and Mac terminals, enter the following commands:

cd <QtSources>
./configure -developer-build
make

On Windows, open a command prompt where your developer tools are set up, and enter the following commands for MSVC builds

cd <QtSources>
configure -developer-build
nmake

If you really need to use a Qt build that does not have private headers in its installation directory, you can set the QT_PRIVATE_HEADERS qmake variable to the include path which contains them, when running qmake on the Qt Creator sources (see below).

Getting and Building Qt Creator

You can get the Qt Creator sources for a specific version either by using one of the released source bundles, or from the Gitorious repository http://qt.gitorious.org/qt-creator. If you intend to contribute to Qt Creator itself, you should use the repository from our Gerrit review tool as described in the developer wiki here: http://wiki.qt-project.org/Setting_up_Gerrit.

We strongly encourage you to do out-of-source builds of Qt Creator (also called shadow-builds). After you put the Qt Creator sources somewhere (lets call the path <QtCreatorSources>) you build it on Linux and Mac with

cd <QtCreatorSources>/..
mkdir qtcreator-build
cd qtcreator-build
<QtInstall>/bin/qmake -r <QtCreatorSources>
make

or the corresponding commands on Windows systems.

If your Qt installation does not contain private headers (see above), you can point Qt Creator to the private headers by setting the QT_PRIVATE_HEADERS qmake variable to the include directory that contains them. On Linux and Mac, enter the following command instead of the qmake call above:

<QtInstall>/bin/qmake -r QT_PRIVATE_HEADERS=<QtSources>/include <QtCreatorSources>