Designing a basic user interface with QML
In this example, we will learn how to use Qt Quick Designer to design our program's user interface.
How to do it…
- 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.
- You will see two QML files in your project resources—
main.qmlandMainForm.ui.qml. The former is where we implement the logic for our application, and the latter is where we design our user interface. We will start with the UI design, so let's open upMainForm.ui.qml. Once it's been opened by Qt Creator, you will see an entirely different UI editor compared to the one we used in previous chapters. This editor is called the Qt Quick Designer, which is used specifically to design UI for Qt Quick projects. The components of this editor are described as follows:- Library: The Library window displays all the predefined QML types that you can add to your UI canvas...
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime