Hello,
I have a problem, when I use QPluginLoader,the return is empty. But the path it is correct.
This is my code:
dir.cdUp();
dir.cd("portal");
qDebug() << dir.absoluteFilePath(fileName);
qDebug() << loader.isLoaded();
qDebug() << loader.errorString();
QObject *plugin
= loader.
instance();
QDir dir( QCoreApplication::applicationDirPath());
dir.cdUp();
dir.cd("portal");
qDebug() << dir.absoluteFilePath(fileName);
QPluginLoader loader(" dir.absoluteFilePath(fileName)");
qDebug() << loader.isLoaded();
qDebug() << loader.errorString();
QObject *plugin = loader.instance();
To copy to clipboard, switch view to plain text mode
The result in line :
1. qDebug() << dir.absoluteFilePath(fileName); is "path this is right", including the name file.
2. qDebug() << loader.isLoaded(); is "false"
3. qDebug() << loader.errorString(); is "unknow error".
and line:
Please, help me. =)
Thanks.
Bookmarks