Accessing objects of a QtPlugin inside another plugin.
-
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
-
Hi,
Then it's the job of the "plugin manager" to pass the required stuff around.
-
-
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.
-
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.
-
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" ?
-
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.