Hello,

I have a problem, when I use QPluginLoader,the return is empty. But the path it is correct.

This is my code:

Qt Code:
  1. QDir dir( QCoreApplication::applicationDirPath());
  2. dir.cdUp();
  3. dir.cd("portal");
  4.  
  5. qDebug() << dir.absoluteFilePath(fileName);
  6. QPluginLoader loader(" dir.absoluteFilePath(fileName)");
  7.  
  8. qDebug() << loader.isLoaded();
  9. qDebug() << loader.errorString();
  10. 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.