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"
↧