C

Project.mainFile

The QML source file defines the first UI screen for an application.

Description

This optional property takes the QML source filename. Although the QML sources of an application are specified using the QmlFiles node, this option is useful if there is one QML file.

Usage

This property is accepted in the main application .qmlproject file, or a module .qmlproject file. It takes a string.

Code example:

Project {
    mainFile: "MyMain.qml"
}

Since

This property was introduced in QmlProject API 1.3 .

Available under certain Qt licenses.
Find out more.