How to build with Qt



Current version of QtCreator is v4.3.1:


The Qt wiki seems really good:

Qt Wiki

Scroll down the main page to find sections on;

  • Install/Build
  • New to Qt 5 (including ‘Qt for Beginners’) and more good stuff


Here is good discussion on how Qt connects it’s visual GUI objects (widgets) to other objects and functions, with Qt’s ‘signal-and-slot’ method (instead of using callbacks): image


A picture is worth a 1000 lines of code. LOL


Today Qt released a new version of Qt Creator: v4.4.0


Just FYI, Unity is written in C++.

“…unless you’re considering making some kind of simpler “make your own game” software for non-programmers to use in the tradition of the old “construction kit” tools from the olden days, you would probably want to choose a lower-level development setting such as c++.”


C# & Javascript, actually. You can use C++ as plugin libraries or if you are prepared for a lot of headaches…


Yeah, but Unity recommends not to use Unity for what we’re doing. It’s important that everyone here understands that we’re using C++ for very good reasons.

"Unity is written in C++, with the following exceptions:

  • we expose a .NET api so that you don’t have to go trough the pain of writing your game in c++, but you can write it in Javascript or c# or boo.
  • The editor application’s UI is written in C#, using mostly the same API that we expose to game developers. (We have access to a few API’s that we don’t expose (yet), but not that many)
  • This is also the reason that the answer to the question “Can I use UnityEngine.dll in some other c# project” is always no. There is hardly any functionality in UnityEngine.dll, the only thing it does is relay your c#/javascript calls into the C++ part of Unity. Without the C++ part there is nothing. "


I’m installing the latest QtCreator v4.4.0 for Windows 64-bit today.
If possible, please use QtCreator v4.4.0 for your OS to build our code:


I had to install ccache on my Ubuntu 16.04, because I got messages that ccache was not found during the Build All step in QtCreator.

See this article for how to install:

The build process in the code is set to use ccache for building in Qt on Linux (not if you’re running Qt on Mac or Windows). The QMAKE_CXX variables are set to use ccache with the g++ compiler.

To speed up the compilation even further, use the -j parameter. The article describes how to use the -j parameter to allow multithreaded compilation.


I got error messages during compilation because it couldn’t locate the OpenGL libraries.

/usr/bin/ld: cannot find -lGL

I didn’t have to install OpenGL on Ubuntu 16.04, as I had already installed them. To check if you have OpenGL libraries installed:

$ glxinfo | grep "OpenGL version"

If you need to install OpenGL, install mesa-utils (they aren’t installed by default on 16.04):

$ sudo apt-get install mesa-utils

To find out more about Qt and installing it on Ubuntu 14.04 and 16.04 here’s the article: Install Qt 5 on Ubuntu - Qt Wiki.


The first time building develop in Qt will take a long time on ubuntu.
Turn off your computer’s suspend after 30 minutes, etc. in power settings.
But good news - all subsequent builds will take less time.

So build the first time through: from top menu Build select Run Qmake then Build All.
And wait. Watch a movie.
For subsequent builds, clean out previous results first: Build/Clean All, Run Qmake, Build All.

Note: If you run ‘Clean All’ before your first build then you’ll get an error message, don’t worry just ‘Run Qmake’

Then when it finishes, Set up the lower left column “monitor” icon: image Select Release, and “valentina”.
Then run and test LibreFashion by clicking on the Green Triangle.


It takes about an hour or so with Windoze… subsequent builds maybe 5-10mins… depending on how much has changed.

Is there a way to just build Tape?

What’s the option to turn off the build of tests?


Add CONFIG+=noTests to the qmake settings to skip the tests.


Thank you… that should cut the build time a bit.


I think the steps for building requires data that’s generated when the entire project is built.


Here is what we now require to build the code with Qt:

Qt v5.7allows us to keep support of Ubuntu 14.04 LTS.

The file on the repo has been updated to reflect these changes.


A silly question - I’ve successfully built Seamly from source (on Ubuntu). Is it possible to run it without doing a make install?


@Calum do you want to run on Ubuntu? I have built from inside QtCreator and am able to run from there. Can you tell a bit more about your system configuration? It is also possible to create an account on launchpad and let them do a build with the appropriate ubuntu and Qt interface libraries so that you can install from your own personal PPA. (I have done this).


Sorry, I should have said - Mint rather than Ubuntu, though there’s probably no practical differences. Mint 17, I think.

To be honest, I couldn’t figure out how to work QtCreator, so I just build it from the commandline with qmake.

I’m just trying to make sure that my “production” copy, installed through the official PPA, doesn’t get trashed by me installing this one over it.