Now it is getting strange:

I removed the QApplication app(argc,argv) line which should be responsible for loading the plugins, startet in release mode and the plugin was still loaded:
Qt Code:
  1. //QApplication app(argc,argv);
  2. MITK_INFO << "QSqlDatabase::drivers(): " << QSqlDatabase::drivers().join(QString("; ")).toLatin1().data() << "\n";
To copy to clipboard, switch view to plain text mode 
Output:
Qt Code:
  1. QSqlDatabase::drivers(): QSQLITE; QPSQL7; QPSQL
To copy to clipboard, switch view to plain text mode 

I'm confused, I thought that the plugins are loaded during instantiation of QApplication?