Getting Started on Windows


This topic provides instructions to compile a Qt Quick Ultralite project for Qt Desktop. The Qt Desktop environment lets you quickly preview the application you are developing, making the process of creating the application faster.

As a reference project let's use the thermostat demo provided with Qt for MCUs.


Currently, Windows 10 64bit is the only supported development host environment. Additionally, you must have the following tools installed, to build any Qt Quick Ultralite project:

  • MSVC compiler v19.16 (Visual Studio 2017 15.9.9 or newer)
  • CMake v3.13 or newer (you can install it using the Qt Online installer)

In addition, install Qt for MCUs using the Qt online installer that is available for download on Qt account.

Important: This guide uses <INSTALL_ROOT> as the reference to directory the Qt for MCUs is installed in.

Command line

Setting up the project

To configure the project, use the CMake command from the command line. First, navigate to the <INSTALL_ROOT>\demos\thermo folder and enter the following commands:

C:\Users\John> set Qul_DIR=<INSTALL_ROOT>
C:\Users\John> cd %Qul_DIR%\demos\thermo
<INSTALL_ROOT>\demos\thermo> mkdir build_winqt
<INSTALL_ROOT>\demos\thermo> cd build_winqt
<INSTALL_ROOT>\demos\thermo\build_winqt> cmake .. -DQUL_PLATFORM=Qt -Ax64

The above commands will check the prerequisites and create the build setup, which includes generating visual studio project files.


To build, use the following command:

<INSTALL_ROOT>\demos\thermo\build_winqt> cmake --build . --target thermo_big --config Release

Running the built application

Once the thermostat application is built, try to run it. As it is built as a Qt application for Windows, it requires the Qt runtime libraries in the PATH. Qt for MCUs does not require you to install the standard Qt for desktop, instead it provides you with all the necessary libraries. You must ensure that these libraries are in your PATH.

<INSTALL_ROOT>\demos\thermo\build_winqt> set PATH=%Qul_DIR%\bin;%PATH%

Now we can run the application:


The Thermostat application window should look like this:

Visual Studio

Setting up the project

To configure the project, follow instructions in the Command line setup section.

Open the solution in Visual Studio

To work with your project using Microsoft Visual Studio, open the solution created by CMake from the build_winqt folder.

Now, you should see the solution tree structure.

As this is a Windows Qt project, it requires Qt's runtime libraries to run. To make them available for the built application, you must set the runtime environment. To do this:

  1. Right-click on your project and select Properties from the context menu.
  2. Click General > Debugging
  3. To Environment add the PATH variable pointing to the directory containing the Qt libraries. Those should be located inside the bin folder of your Qt for MCUs install root, for example:

After this step (assuming %Qul_DIR% was set to C:\QtForMCU\1.1.0) the project properties window should look like this:

Build & run

Apply the changes, build the application, and run it. You should see on the screen the thermostat demo.

Qt Creator Setup

The following sections provides instructions to set up Qt Creator for Qt for MCUs development on the Windows platform only. For details about configuring Qt Creator for development on MCU boards, refer to Qt Creator documentation.

Enable Qt Creator plugins

To enable development for MCU, ensure that the appropriate plugins are enabled:

  1. Select Help > About Plugins and choose Bare Metal and MCU Support (experimental) plugins from the list.
  2. Restart Qt Creator to apply changes

Create a kit for Qt for MCUs

To build and run your application for MCU, you must create a kit in Qt Creator:

  1. Select Tools > Options > Devices > MCU
  2. Select Qt for MCUs - Desktop 32bpp as the target.
  3. If not already set, provide the path to the Qt for MCUs installation directory.
  4. Click Apply.

Opening the Thermostat project

To open the Thermostat project:

  1. Select File > Open File or Project...
  2. Open the CMakefiles.txt file from thermo folder.
  3. Select Qt for MCUs - Desktop 32bpp kit.
  4. Click Configure Project to finish.

The project should be configured.

Now, you are ready to go!

Note: For more information, refer to the Qt Creator manual.


You can debug the C++ code generated from your application using the Qt Creator or Microsoft Visual Studio. To make debugging a bit easier, in the generated code you will see snippets of the QML, from which the C++ code was generated.

Available under certain Qt licenses.
Find out more.