Yes, you need to add the void showSettingsDialog() function to MyPlugin
Yes, you need to add the void showSettingsDialog() function to MyPlugin
My main application now "unexpectedly finishes" if I uncomment the commented out line:
Qt Code:
dirIter.next(); QPanelAppletInterface *plugin = qobject_cast<QPanelAppletInterface*>(loader.instance()); //ui->appletLayout->addWidget(plugin->getWidget());To copy to clipboard, switch view to plain text mode
Most probably, plugin is 0 resulting in the crash.
To prevent the crash, but not solve it do this:
Qt Code:
if (plugin) ui->appletLayout->addWidget(plugin->getWidget());To copy to clipboard, switch view to plain text mode
Now, to solve the plugin problem.
1. check if loader does point to the correct file. This means that dirIter.filePath() should be the same as "/home/you/where/the/plugin/is/myplugin.so"
2. Check if the cast can actually be performed. Therefor, the instance returned by the plugin loader needs to be correct at least.
It finally works!!!
The problem is that it was trying to load the files "." and "..".
Nice, well done.
Bookmarks