Yes, I do have multiple versions installed, but I made sure to compile and windeploy with the correct ones.
In any case, with your advice, we were able to solve the issue:
void openDatabase(const QString &databasePath)
{
static bool initialized = false;
QSqlDatabase database;
if (!initialized) {
database = QSqlDatabase::addDatabase("QSQLITE");
initialized = true;
} else {
database = QSqlDatabase::database();
}
With this, the error is gone and the program works both with and without windeployqt. As you said, we only use this in the openDatabase function.
Thank you for your advice! In retrospect the solution is rather obvious, but the strange behavior with windeploy really got us confused :)