Let's create a project to better understand what QML is. In Qt Creator, select File and then New File or Project in the main menu. Choose Application in the left column and select the Qt Quick Application - Empty template. Name the project as calculator and go through the rest of the wizard.
Qt Creator created a sample application that displays an empty window. Let's examine the project files. The first file is the usual main.cpp:
#include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); ...