I build my project on Qt5.7.0 with mingw, when I set the connection options it was not work, but I didnt set this option it was worked! and I also cant not read the .db file with the sqlite db browser because of using that driver, but, actually, I didnt set password ,cause I havent set the connection options, It should not be encrypted. what's wrong with my project?
if(QSqlDatabase::contains("qt_sql_default_connection"))
{
db = QSqlDatabase::database("qt_sql_default_connection");
}
else
{
db=QSqlDatabase::addDatabase(dataBaseVersion);
}
db.setHostName(ip);
db.setPort(port.toInt());
db.setDatabaseName(dataBaseName);
db.setUserName(userName);
db.setPassword(passWord);
//db.setConnectOptions("QSQLITE_CREATE_KEY"); //if I set this connectionOptions, then I cant open my .db file.
I build my project on Qt5.7.0 with mingw, when I set the connection options it was not work, but I didnt set this option it was worked! and I also cant not read the .db file with the sqlite db browser because of using that driver, but, actually, I didnt set password ,cause I havent set the connection options, It should not be encrypted. what's wrong with my project?
if(QSqlDatabase::contains("qt_sql_default_connection")) { db = QSqlDatabase::database("qt_sql_default_connection"); } else { db=QSqlDatabase::addDatabase(dataBaseVersion);
}
db.setHostName(ip);
db.setPort(port.toInt());
db.setDatabaseName(dataBaseName);
db.setUserName(userName);
db.setPassword(passWord);
//db.setConnectOptions("QSQLITE_CREATE_KEY"); //if I set this connectionOptions, then I cant open my .db file.