This topic provides instructions to develop the classic hello world application. It lets you quickly explore the Qt for MCUs offering by creating this simple application. It uses the Qt Creator's new project template that is designed specifically for the MCU platforms.
Before you start, ensure that the following prerequisites for the Windows development host are met:
In addition, install Qt for MCUs using the Qt online installer that is available for download on Qt account .
Now that the prerequisites are installed, follow the instructions in these sections to set up Qt Creator.
To develop for MCUs using the Qt Creator IDE, the MCU plugin is required. The Qt online installer enables it by default when you install the Qt for MCUs SDK.
To enable or disable the plugin, follow these instructions:
To build and run your application on MCUs, you must create a kit:
注意： You could also manually create/remove kits using Create Kit and Remove Kit .
注意： Automatically create kits for all available targets on start option is available from Qt Creator v4.14 onwards. On older versions of Qt Creator, you have to explictly create or remove kits using Create kit or Remove kit .
Now, assuming that your development environment is ready, the following list guides you through the process:
After you select Finish on the project wizard, your project explorer looks like this:
The Text item's
by default. Try increasing the font size to
for example. You could also set a background color, by setting the
. This is how the QML file looks after you have made these changes:
Now, run the application to see how it looks.
The application is configured to run on the desktop, but you can also retarget it run on a NXP hardware for example. Before you do so, ensure that you have necessary setup to run on any of the supported hardware platforms. To get started on any of these platforms, follow instructions in these topics:
In addition, configure Qt Creator to build and run applications on these targets. For more details, refer to Qt Creator 手册 .
Once the setup is ready, select 运行 or use the Ctrl + R keyboard shortcut to see your application running on the target.