How to do it...

Let's follow these steps to get started:

  1. First of all, create a new Qt Quick application project, just like we did in the previous recipe.
You can also use the previous project files if you wish to.
  1. You will see a QML file in your project resources—main.qml. This is where we implement the logic for our application, but we will also need another QML file where we define our user interface.
  1. Let's create the QML UI file by going to File | New File or Project, then select QtQuick UI File under Qt category as shown in the following screenshot:
  1. Let's call the Component name Main and Component form name MainForm as follows: ...

Get Qt5 C++ GUI Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.