Application Classclass Qul::Application
The Application class is used to start Qt Quick Ultralite. More...
|Since:||Qt Quick Ultralite 1.2|
This class was introduced in Qt Quick Ultralite 1.2.
|void||addImageProvider(const char *providerId, Qul::ImageProvider *provider)|
|void||setUiLanguage(const char *language)|
Construction of this class initializes Qt Quick Ultralite. Typically it is constructed in the
main() function, the item shown at startup is set with setRootItem() and exec() is then called to enter the event loop. Before entering the event loop, hardware must be initialized by Qul::initPlatform() or your own code. For example if the root item defined in QML is called Main:
Qul::initPlatform(); Qul::Application app; static struct Main item; app.setRootItem(&item); app.exec();
Member Function Documentation
void Application::addImageProvider(const char *providerId, Qul::ImageProvider *provider)
Sets the provider to be used for requesting images via the
image:// url scheme, with host providerId .
The Application does not take ownership of the provider .
See the ImageProvider documentation for details on implementing and using image providers. All required image providers must be added to the engine before any QML sources files are loaded.
The providerId must be null-terminated.
Enters Qt Quick Ultralite event loop and does not return.
void Application::setRootItem(Qul::RootItem *root)
Sets the item shown at application startup to be root. The items are defined in QML and the struct that represents them in C++ is defined in a generated header, which has the same name as the .qml file.
Sets the value of
Qt.uiLanguage to language. If this function is not called,
Qt.uiLanguage defaults to an empty string, which means that the source language is used.
Available under certain Qt licenses.
Find out more.