Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[Solved] Pure QML plugin as a single file (library)

$
0
0
OK, I’ve found the solution. Create new project as a static/dynamic library. Add the qml files to the project. Create a resource description with a custom prefix (‘controls’ for example), add there the qml files. Compile the library Add library import into the main application project’s settings. Add resource initialization into the beginning of int main() of the application: Q_INIT_RESOURCE_EXTERN(controls) Q_INIT_RESOURCE(controls); Import library qml items by specifying the relative path: import "../controls"

Viewing all articles
Browse latest Browse all 4972

Trending Articles