Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Developing project with multiple apps and common QML module/library in Qt Creator
Forum Update on Monday, May 27th 2025

Developing project with multiple apps and common QML module/library in Qt Creator

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 993 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    molesmoke
    wrote on 29 Oct 2013, 10:49 last edited by
    #1

    I've been looking for a while for information or an example on how to structure a project with multiple apps that reference a common QML module (with both C++ and QML files). Whilst there is an example (http://qt-project.org/doc/qt-5.1/qtqml/qqmlextensionplugin.html), its seems a little too vague for me to understand how the actual shared library (.so/.dll) and QML are supposed to be built and installed and then referenced by an application.

    It would be great if the TimeExample had an actual complete subdirs project that showed the library being built as one sub-project and another sub-project that was an application using it - it must surely be a common development situation.

    As an example, using Qt Creator, I would like to have the following project structure:

    /project
    --/qmllib
    --/app1
    --/app2

    Say that qmllib contains both QML items provided through *.cpp (via QQmlExtensionPlugin) and *.qml files (similar to the TimeExample in the documentation). How should app1 and app2 be configured to use qmllib? I can't see how this is intended to work, especially in conjunction with Qt's shadow build feature - the shared library will be built in one directory, but the qml and qmldir files will exist in another.

    In some of the Qt examples, qml files are used as resources (*.qrc) - this seems like it could be a nice approach to solving this issue (since they would become part of the shared library), but I can't find any information on creating qmldir files that reference types defined in resources.

    If anyone could shed some light on a good approach I would be most grateful!

    1 Reply Last reply
    0

    1/1

    29 Oct 2013, 10:49

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved