Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Static linking of custom QtQuick plugins
Forum Updated to NodeBB v4.3 + New Features

Static linking of custom QtQuick plugins

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.6k 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.
  • P Offline
    P Offline
    pcspets
    Qt Champion 2021
    wrote on last edited by
    #1

    Hi

    I have written a bunch of QtQuick plugins that I need to statically link on iOS. I believe I do everything correctly, the lib is linked successfully, because I can use it in C++, but when trying to import it in QML, I get:

    bq. static plugin for module "QtQuick" with name "VLTCorePlugin" has no metadata URI

    And that is correct, when I print out metaData of my plugin
    @qDebug() << qt_static_plugin_VLTCorePlugin().metaData();@

    Then I get:

    bq. QJsonObject({"IID": "VLTCore","className": "VLTCorePlugin","debug": true,"version": 328193})

    No "uri" in there. But how can I add it?

    Just to check, I printed out the metadata of QtQuick plugin itself, and indeed there is a "uri":

    bq. QJsonObject({"IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0","MetaData": {},"className": "QtQuick2Plugin","debug": true,"uri": ["QtQuick.2"],"version": 328193})

    1 Reply Last reply
    1
    • P Offline
      P Offline
      pcspets
      Qt Champion 2021
      wrote on last edited by
      #2

      I found out where the URI is set in essential plugins, it's set by custom variable TARGETPATH that ends up in

      @QMAKE_MOC_OPTIONS += -Muri=$$URI@

      in the file

      bq. qtbase/mkspecs/features/qml_plugin.prf:31

      If qmake MOC options is the right way to do it, it must be written in the documentation, i guess?

      When I add it to my plugin's *.pro file, it works at least.

      1 Reply Last reply
      1
      • strahlexS Offline
        strahlexS Offline
        strahlex
        wrote on last edited by
        #3

        Thank you very much this still works and is needed to get QtQuick plugins working on iOS.

        Feel free to check out my website machinekoder.com
        and my pet projects Intellicute and QtQuickVcp

        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