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. QML Modules, Plugins and meta data
Forum Updated to NodeBB v4.3 + New Features

QML Modules, Plugins and meta data

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 280 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.
  • C Offline
    C Offline
    Cute3d
    wrote on last edited by
    #1

    Hi,

    I wrote my own QML Module which is just a collection of different QML files. I work with CMake instead of QMake.

    If I add the plugin inside the App folder and set in the main.cpp

    qmlAppEngine.addImportPath("plugin")
    

    It does work.

    Since I want to use this module for different Apps, I moved it into another folder.

    qmlAppEngine.addImportPath("../../plugin")
    

    This leads to the error:

    plugin cannot be loaded for module  "FooPlugin": Failed to extract plugin meta data from "..../fooplugin.so"
    

    I had a look at this documentation https://doc.qt.io/qtcreator-extending/plugin-meta-data.html

    But it didn't help.
    So my questions are:
    Why does it work in this particular case?
    Where do I have to place the meta data json file?
    Did I forget to set some macros or similar?

    Is there another way to reuse the same qml files for different apps in the same project. Because at the beginning I tried to add to the .qrc file the relative paths to the external folder.

    Same issues as above. It works if the qml files are in the same folder as the app, doesn't work if the qml files are at an another place. After I searched for this problem, I found a forum post, that one should use modules to fix this issues....

    Maybe someone had already the same issues and solved them. I am happy for any suggestions

    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