Introducing QML
QML (Qt Modeling Language) is a user-interface markup language for designing touch-friendly user interfaces, similar to how CSS works on HTML. Unlike C++ or JavaScript, which are both imperative languages, QML is a declarative language. In declarative programming, you only express the logic in your script without describing its control flow. It simply tells the computer what to do, instead of how to do it. Imperative programing, however, requires statements to specify actions.
When you open up your newly created Qt Quick project, you will see main.qml and MainForm.ui.qml in your project, instead of the usual mainwindow.h and mainwindow.cpp files. You can see this in the project directory in the following screenshot:
This ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access