O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exporting QML components in a namespaced module

In Chapter 3, Wiring User Interaction and Delivering the Final App, when dealing with the initial setup for the Cute Comics project, we learned how to create a qmldir file to expose a QML module, and later on we added both the qmldir file and the TableSurface QML document to the gui.qrc resource file. It is now time to expose the UI components that we created for the Cute Comics Composer project through the QML module, so that we can use them in our client application by importing them, without needing to care whether the components live on the filesystem or as embedded resources. We thus open the qmldir file and add references to our gui components:

// gui/qmldirmodule cutecomics.guiComposition ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required