[Qt-interest] QPluginLoader problem

RZ rz at univie.ac.at
Wed Sep 23 23:10:52 CEST 2009


Hi,

I got about 40 plug-ins added to my application. Each plug-in 
is/represents a class (and some newly defined virtual methods of a base 
class). Today I had to discover that calling QPluginLoader::instance() 
does _not_ create a new instance of my class for each time that it is 
called but only for the first time. The docs state that "If the root 
component object was destroyed, calling this function creates a new 
instance."

So first: what is the "root component"?
Second: How to instantiate several instances of my classes from the plug-in?

(As stated the QObject* returned from QPluginLoader::instance() does not 
return a new object calling it again).


Thx for any help,

RZ



More information about the Qt-interest-old mailing list