Well, I'm trying to loading the echoplugin, inculded in the Qt's 4.6.0 package from my application but i can't done it. I'm compiling on Windows with Visual Studio and VS Add-in, all projects works fine, and if i compile the Echoplugin example, it loads the plugin fine, but my application can't do it.

Here is the function:

Qt Code:
  1. Programa::Programa(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags)
  2. {
  3. ui.setupUi(this);
  4. QDir pluginsDir(qApp->applicationDirPath());
  5. pluginsDir.cd("plugins");
  6. foreach (QString fileName,pluginsDir.entryList(QDir::Files))
  7. {
  8. QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
  9. QObject *plugin = pluginLoader.instance();
  10.  
  11. if (plugin)
  12. {
  13. QMessageBox::information(this,"xD","Plugin cargado!!! :D");
  14. }
  15. else
  16. {
  17. QMessageBox::information(this,"xD",pluginLoader.errorString());
  18. }
  19. }
  20.  
  21. return;
  22. }
To copy to clipboard, switch view to plain text mode 

QPluginLoader::instance() returns always null, and the QPluginLoader::errorString() returns "Unknown Error". I think that the code isn't the problem, so i suspect that error could be in the project configuration. ?

Thanks in advance