QPSQL driver not loaded
-
Hello everyone, I know that this topic has been raised more than once, but I did not find anything for myself ... Here is the code:
db_ = QSqlDatabase::addDatabase("QPSQL"); db_.setHostName("localhost"); db_.setDatabaseName("lshiela"); db_.setUserName("lshiela"); db_.setPassword(""); qDebug() << QSqlDatabase::drivers(); if (db_.open()) { qDebug() << "db open"; } else { qDebug() << "db not open"; }get:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
QList("QSQLITE")
db not openBut there is libqsqlpsql.dylib in sqldrivers folder. Why can't he see her? Thanks
-
Hello everyone, I know that this topic has been raised more than once, but I did not find anything for myself ... Here is the code:
db_ = QSqlDatabase::addDatabase("QPSQL"); db_.setHostName("localhost"); db_.setDatabaseName("lshiela"); db_.setUserName("lshiela"); db_.setPassword(""); qDebug() << QSqlDatabase::drivers(); if (db_.open()) { qDebug() << "db open"; } else { qDebug() << "db not open"; }get:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
QList("QSQLITE")
db not openBut there is libqsqlpsql.dylib in sqldrivers folder. Why can't he see her? Thanks
@Idodoqdo said in QPSQL driver not loaded:
But there is libqsqlpsql.dylib in sqldrivers folder. Why can't he see her? Thanks
Maybe because you're using another Qt installation for your running program?
-
@Idodoqdo said in QPSQL driver not loaded:
But there is libqsqlpsql.dylib in sqldrivers folder. Why can't he see her? Thanks
Maybe because you're using another Qt installation for your running program?
@Christian-Ehrlicher
Yes it looks like that one -
@Idodoqdo said in QPSQL driver not loaded:
But there is libqsqlpsql.dylib in sqldrivers folder. Why can't he see her? Thanks
Maybe because you're using another Qt installation for your running program?
@Christian-Ehrlicher
No. I look for the presence of the library in the same qt in which I run. Please tell me what I need to provide to make the problem clearer -
There are a lot of such questions in the forum - you can search for QT_DEBUG_PLUGINS