Declaration of VAR

and some other stuff

Installing Qt for the first time

2017-03-29 13:56:46 +0200

2017-03-29 13:56:46 +0200 | Comments

I saw today a question about installing Qt with the official installer: “What’s the proper configuration or setup in the installation menu? It shows whole bunch of options and I have no idea what to select or deselect”.

Indeed, as I now remember my first time I was installing Qt, for me it also looked completely not-intuitive in regard to what do I need to install and what is what in general. So, here’s an article about it.

If you use Qt under one of the Open Source licenses, installers for you are available here. If you’re a commercial user, then download it from your Qt Account.

Either way, I recommend to use the online installer (and only this one contains components for embedded development, by the way). Of course, feel free to build Qt from sources or use whatever pre-installed packages in your Linux distro (and bravely fight with all the consequences), but us - silly users - we prefer to use convenient and trusted official installer.

Mainly, the installation process, as mentioned above, is merely about the set of components to install. And, in general, you only need to check the corresponding toolchain and the rest is optional, but of course for the fist time the easiest way would be just to install everything.

Here’s some explanation and comments about common components (disregarding the target platform):

  • choose the latest version of Qt available (except snapshots/betas). Usually, there are several Qt version available, but for obvious reasons it makes sense to use the latest stable one (if possible). You can install several versions of Qt in the same time (and they will live quite fine together), but if you don’t have any particular reason for that - just stick with the latest one;
  • Qt Charts, Qt Virtual Keyboard, etc - those are addon-libraries (providing charts, on-screen-keyboard, etc) and are not essential, most Qt projects are totally fine without them;
  • any (TP) component - those are Technology Previews for some new features, so in 95% cases you can just uncheck them. Those components are not essential and are added as a first public appearance (without any guaranty regarding their stability or reliability). However, if you want to keep up with what’s going on, you should definitely try those (and provide some feedback);
  • any (Deprecated) components should be unchecked without questions asked;
  • Sources - the source code of Qt in case you would like to re-build Qt or inspect some components;
  • Tools:
    • Qt Creator - the main Qt’s IDE, installed by default;
    • Qt Installer Framework - a pretty handy thing that allows you to create installers for your applications (including online* installer/updater).

And now some specific stuff for Windows, Linux and Mac OS.

Desktop

Windows

Here we have a choice between MinGW or MSVC toolchains. I prefer MinGW (well, actually I never tried MSVC), and for that option you also need to install its runtime from the Tools section.

Here’s the full list of components I usually install on Windows:

Linux

Here we have only the GCC toolchain available, so it’s easy:

Mac OS

Like with Linux, there is only one toolchain available:

Embedded

If you want to install tools for embedded development (that’s available only under commercial license), then you need to install everything like for desktop development from above and in addition those components (depending on the device you have):

That way you will have cross-compilation toolchains, pre-build Boot to Qt images, emulator and configuration tool for Qt Lite.

By the way, embedded stuff is only available for Windows and Linux x64 host-machines at the moment. There is some work ongoing to add this for Mac OS too, but it’s still in progress.

Mobile

Well, it’s all the same as desktop, but in addition you need to check the corresponding platform (like Android ARMv7) and then install some additional 3rd party SDK tools - but that’s a material for a separate article, I will not cover it here.