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. Best practice for adding qml to resources (on mac (MACOSX_BUNDLE TRUE)
Forum Updated to NodeBB v4.3 + New Features

Best practice for adding qml to resources (on mac (MACOSX_BUNDLE TRUE)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 268 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    shemeshg
    wrote on last edited by
    #1

    Hi

    The question

    • What is the most recommended way to add a add_subdirectory Qml files to the resource?

    • I understand, there might be many ways to accomplish this,
      My primary goal is

    1. to maintain mylib sub_folder autonomous as possible.
    2. Link mylib as elegant as possible at the parent CMakeLists.txt.

    Detailed description of the problem

    https://github.com/shemeshg/qt-qml-cmake-api

    The following very simple example will compile and run when (MACOSX_BUNDLE FALSE)

    However it will compile and not run with (MACOSX_BUNDLE TRUE).

    QQmlApplicationEngine failed to load component
    qrc:/hello/main.qml:13:5: FramedImage is not a type
    

    This is because it is not in any "qrc:/".

    1 Reply Last reply
    0

    • Login

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