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. [SOLVED]Qt Plugin metadata
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Qt Plugin metadata

Scheduled Pinned Locked Moved General and Desktop
18 Posts 6 Posters 14.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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 5 Aug 2013, 21:47 last edited by
    #9

    Hi,

    Did you dump the content of pluginLoader.metaData() ?

    I just tried with a simple plugin and got the value of name using:
    @pluginLoader.metaData().value("MetaData").toObject().value("name").toString();@

    Also don't forget to "touch" the plugin header file before rebuilding to take the json file modifications in account.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on 6 Aug 2013, 01:09 last edited by
      #10

      As AGalst suggested, you forget the key "MetaData" if you want to get access the json file contents passed in the Q_PLUGIN_METADATA. Other information such as IID can be access through the key "IID" etc.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mbnoimi
        wrote on 6 Aug 2013, 13:47 last edited by
        #11

        Thanks a lot guys, it works fine.

        I wonder does this info mentioned in Qt docs?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 6 Aug 2013, 14:07 last edited by
          #12

          You're welcome !

          From the ones I searched through, no, this call for an update to the documentation

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbnoimi
            wrote on 6 Aug 2013, 14:15 last edited by
            #13

            [quote]From the ones I searched through, no, this call for an update to the documentation[/quote]

            Usually I create wiki page for missing docs but because I haven't the suitable knowledge about Qt Plugins, May you please create a wiki page.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 6 Aug 2013, 14:48 last edited by
              #14

              Correction to the doc would have a wider impact. Can you point me to your wiki entries so I can see what would be a good addition to the official documentation ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mbnoimi
                wrote on 6 Aug 2013, 15:26 last edited by
                #15

                bq. Can you point me to your wiki entries

                I didn't write any entries I just suggested to add them by you.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 6 Aug 2013, 20:34 last edited by
                  #16

                  For the quick road, I have added a doc note

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mbnoimi
                    wrote on 6 Aug 2013, 21:15 last edited by
                    #17

                    [quote author="SGaist" date="1375821248"]For the quick road, I have added a doc note[/quote]

                    Thanks a lot :)

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kshots
                      wrote on 18 Feb 2014, 21:09 last edited by
                      #18

                      Definately much appreciated. I was trying to use the new metadata interface for the same reasons, and found the same lack of details in the docs. I have my own implementation working properly now (thanks to this thread), but it would be nice to have some references in the docs about this metadata and json structure.

                      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