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. Accessing objects of a QtPlugin inside another plugin.
Forum Updated to NodeBB v4.3 + New Features

Accessing objects of a QtPlugin inside another plugin.

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 2 Posters 466 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.
  • L Offline
    L Offline
    Luckless
    wrote on last edited by Luckless
    #1

    I have made a plugin "Model" and a plugin "View" and I'm loading these plugins in my main Application using QPluginLoader.
    I understand this much that I can get the root Object of the plugin I am loading using QPluginLoader::intance() inside my main Application.
    But how do I get root Object of my "Model" plugin inside my "View" plugin ?

    note: I don't want to load my "Model" Plugin Inside my "View" plugin

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Then it's the job of the "plugin manager" to pass the required stuff around.

      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
      • L Offline
        L Offline
        Luckless
        wrote on last edited by Luckless
        #3

        Thanks!
        Sorry I dont have deep knowledge of QT. Can you help me with an example on how to use pluginmanager?
        I got stuck in the first few line of the document, because i'm not able to include <PluginManager.h>. It says could not find header.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I did put these two words in quotes on purpose. The plugin manager is the class you are using to load your plugins and manage them.

          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
          • L Offline
            L Offline
            Luckless
            wrote on last edited by
            #5

            But the problem is that I'm neither able to find pluginmanager nor ExtensionSystem anywhere on my system. So, are these third party classes that I need to download ?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Because there are not such ready made classes. Qt provides the mechanism for loading plugins however it's up to you to manage them because you know how you want to use them and how they work.

              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
              • L Offline
                L Offline
                Luckless
                wrote on last edited by
                #7

                I am really sorry.... I was following this:

                https://doc.qt.io/qtcreator-extending/extensionsystem-pluginmanager.html

                And thought its something qt provides. It clearly tells about a class ExtensionSystem::PluginManager. What does the above page mean when it says "Extending Qt Creator Manual" ?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  That is class that you can use if you want to extend Qt Creator itself, it's not related to Qt the framework.

                  It also proves my point: the "plugin manager" is specific to your use case and not something generic.

                  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
                  2
                  • L Offline
                    L Offline
                    Luckless
                    wrote on last edited by
                    #9

                    Makes Sense!
                    Thanks a lot

                    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