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 way to use custom QML-Plugins in applications?
QtWS25 Last Chance

Best way to use custom QML-Plugins in applications?

Scheduled Pinned Locked Moved QML and Qt Quick
qmlcustom pluginsqqmlextensionpl
5 Posts 2 Posters 1.4k 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.
  • T Offline
    T Offline
    themts
    wrote on 24 Mar 2015, 08:51 last edited by
    #1

    Hey guys,

    I have to write several qml-Plugins which I will use from different applications.
    I already saw the QQmlExtensionPlugin Class (QQmlExtensionPlugin Class) but I would prefer a static way.

    Of course I can just import my source files and call all the qmlRegisterType functions manually but maybe there is a recommended way?

    CU
    mts

    P 1 Reply Last reply 25 Mar 2015, 06:25
    0
    • T themts
      24 Mar 2015, 08:51

      Hey guys,

      I have to write several qml-Plugins which I will use from different applications.
      I already saw the QQmlExtensionPlugin Class (QQmlExtensionPlugin Class) but I would prefer a static way.

      Of course I can just import my source files and call all the qmlRegisterType functions manually but maybe there is a recommended way?

      CU
      mts

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 25 Mar 2015, 06:25 last edited by
      #2

      @themts What do you mean by static way ? AFAIK QQmlExtensionPlugin is the recommended way.

      157

      1 Reply Last reply
      0
      • T Offline
        T Offline
        themts
        wrote on 25 Mar 2015, 07:33 last edited by
        #3

        If I understand QQmlExtensionPlugin correctly, it is a plugin interface class to load qml extensions which are already compiled. So I would create a plugin project, compile it and load it dynamically by me application.
        I don't want to compile it to a binary, I want to compile it with my application.
        Would I use the QQmlExtensionPlugin class anyway and call registerTypes myself?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          themts
          wrote on 25 Mar 2015, 13:44 last edited by
          #4

          Ok, I found something in the docs:
          http://doc.qt.io/qt-5/plugins-howto.html#static-plugins

          P 1 Reply Last reply 26 Mar 2015, 05:09
          1
          • T themts
            25 Mar 2015, 13:44

            Ok, I found something in the docs:
            http://doc.qt.io/qt-5/plugins-howto.html#static-plugins

            P Offline
            P Offline
            p3c0
            Moderators
            wrote on 26 Mar 2015, 05:09 last edited by
            #5

            @themts Good find. Seems suitable for your requirement.

            157

            1 Reply Last reply
            0

            1/5

            24 Mar 2015, 08:51

            • Login

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