I don't understand how to create an empy application that only loads a plugin that is a GUI itself.
I cannot make it work ...
Actually I have a main.cpp that creates and executes a QApplication
int main(int argc, char *argv[])
{
MainApp app(argc, argv);
return app.exec();
}
int main(int argc, char *argv[])
{
MainApp app(argc, argv);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
{
Q_OBJECT
public:
MainApp(int &argc, char **argv);
~MainApp();
private:
void loadPlugins();
}
class MainApp : public QApplication
{
Q_OBJECT
public:
MainApp(int &argc, char **argv);
~MainApp();
private:
void loadPlugins();
QDir pluginsDir;
QStringList pluginFileNames;
}
To copy to clipboard, switch view to plain text mode
when MainApp is created it calls loadPlugins:
MainApp::MainApp(int &argc, char **argv) :
{
loadPlugins();
}
MainApp::MainApp(int &argc, char **argv) :
QApplication(argc, argv)
{
loadPlugins();
}
To copy to clipboard, switch view to plain text mode
QPluginLoader loader(..) fails as I get:
ERROR !!! loader.isLoaded(): <0> - loader.errorString(): <Unknown error>
Does anybody know something about it ?
Thanks.
Bookmarks