For PCs running a version of Microsofts Windows operating system - this can be Windows XP, Windows Vista, Windows 7 or the new Windows 8 - Microsofts own Visual Studio development software is the default option for a fitting development environment (and one of the best).
Among the different Visual Studio products Microsofts Visual C++ (MSVC) is the product of choice for programming in the C++ programming language. The current version 5 of the Qt library supports the 2010 version of Visual C++. The newer 2012 version is also fully supported by Qt, but currently not easily available. Instead, you can download the 2013 version, but this is not yet fully supported by the Qt development tools (see the Qt supported platforms info here), so the 2010 version can be used for the time being.
While Microsoft aims its Visual Studio software at professional software developers, they thankfully also supply the slightly trimmed-down "Express" versions of their Visual Studio development tools on the Visual Studio Express website as a cost-free download:
With the current design of Microsofts webpages for the Express versions of their Visual Studio products, you have to go down a little and select the entry labeled "2010 Express products" like shown in the image above.
When you click on the area labeled "See download details" here you will get to the list of available Visual Studio 2010 Express products. By clicking on the entry for Visual C++ 2010 Express you then finally get the option to download it:
Here, you can select one of several available languages. This only affects the texts for the menus, options etc. in the Visual C++ development environment user interface. The C++ programming language is not affected by this (it always uses English keywords).
Once you have selected your language of choice, you can click on the "Install now" link. This will start the download of a small installation program named "vc_web.exe".
This installation program can then be used to start the download and installation of Visual C++ 2010 express.
For Windows XP, the Qt support documentation currently lists two different options, namely Microsoft Visual C++ 2010 and MinGW.
If you have installed Microsofts Service Pack 3 for Windows XP, you also should be able to install and use Visual C++ (Express) 2010 on Windows XP. According to Microsoft, it should run on XP SP3.
However, if you are experiencing problems with the Qt development environment using this option, you should uninstall Visual C++ (Express) 2010 and install version 2008 or the MinGW tools instead.
Alternatively to Microsoft Visual Studio Express 2010 you can use MinGW, which is a Windows port of the standard Linux/Unix GCC (GNU Compiler Collection) tools. These are available from the MinGW website. Detailed instructions for downloading and installing MinGW can be found on the "getting started" page:
For MinGW, the easiest option is to download and run the GUI installer "mingw-get-inst" which can be found on the SourceForge website under the following link:
After having downloaded the basic C++ development tools in the previous step the next step is to install the tools on your system, unless the download automatically started an installation.
If you used one of the "installation" download links from the Microsoft Visual Studio Express website as described above, there should now be a small online installation program (usually "vc_web.exe") in your download folder.
This installation requires an active internet connection. It connects to Microsofts download servers and downloads and installs all components for Visual C++, including all necessary system extensions. Just start the web install programm which you previously downloaded. This will present all further steps within on-screen dialogs:
After clicking on the button labeled "Next" in this first dialog screen you will be presented with the usual license terms for Visual C++ 2010 Express:
After reading and/or printing the license, select the option "I have read and accept the license terms" and click on the "Next" button to continue.
The next step in the installation process lets you choose if you want to install Microsoft Silverlight (if this is not already installed on your Windows system) and Microsoft SQL Server 2008 Express (with service pack 1). You should select both options in order to get the most flexibility for software development:
After selecting SQL Server Express and Silverlight, you can choose the location where the Visual Studio software will be installed. You can just go with the default option here:
Once the installation location has been selected, the components for Visual C++ 2010 Express are downloaded from the Microsoft servers and installed onto your system:
If you chose to install MinGW on your Windows XP system, you have to start the installation program just like with Visual C++ 2010 Express.
The only difference lies in the name of the installation program ("mingw-get-inst" for the graphical installer) and the online servers it connects to, apart from the different directories used for the installation.
You can also manually install MinGW following the description on the "get started" page, but this is not really necessary.
After having set up the basic C++ development tools for your system in the previous step, it is now time to install the additional Qt development libraries and tools. These will provide an additional framework which makes the development of modern desktop applications much easier than if we were using C++ alone.
The main Qt website can be found under http://qt.digia.com/ since Qt has been acquired by digia. While you can currently download an evaluation version there, for this tutorial and further open source development you should instead turn to the Qt developer network homepage - the open source version can be used free of charge:
The current version of Qt is 5.2.1 (at the beginning of February 2014). This is the first version to add full support for mobile platforms.
I will use Qt 5.2.x for the upcoming parts of this tutorial, occasionally updating the tools by either downloading new versions or using the integrated maintenance function.
Unless Qt is updated to version 6, it is usually no great problem to install smaller updates. For this tutorial, the small changes represent no problem.
On the download page you can find links for separate downloads of individual components of the Qt SDK. We do not need these at the moment as the SDK download contains all necessary tools. Just select the offline or online installer for the operating system you are using.
There we can download the Qt SDK (software development kit) for Windows, Linux and MacOS by using the links on the download page http://qt-project.org/downloads.
As you can see on the Qt download page, the basic choice for all available versions for the different operating systems is one between the online and the offline installers for each operating system.
In order to have the most flexible options for future software development, my personal recommendation is to download and install most of the available parts of the Qt SDK. Therefore I would advise you to choose the offline installer. This also avoids possible connection problems during the installation of the documentation.
The online installer option will start the download of a smaller program (named something like
"QtSdk-online-win-x86-v1_2_1.exe" in the case of the Windows version of the Qt SDK). Starting this program on your computer after it has been completely downloaded will bring you to the next step in the installation process, the selection of the Qt SDK parts for the final installation.
With the offline installer a larger file will be downloaded to your computer (for Windows this is named something like "QtSdk-offline-win-x86-v1_2_1.exe"). This file already contains all currently available parts of the Qt SDK, so an additional download is not necessary.
Independent of the installer version you chose, each Qt installer will bring up a series of dialog windows after you start the program.
In Qt 5, all necessary development tools (the Qt library, Qt Creator, Qt Linguist and other software) are already included in the standard installation option, so you can accept the default installation options. If you like, you can chose to install the Qt source code, but it is not necessary for this tutorial.
Simply accept the default settings and the Qt library and tools will be installed automatically.
After the C++ and Qt development tools have been downloaded and installed, you can continue to step number seven for a short test that will confirm if everything has been installed correctly.
Alternatively, if you want to install C++ and Qt on additional computers with different operating systems, you can continue to the next page.