devbean / QtCipherSqlitePlugin

A Qt plugin for cipher SQLite.
http://qtciphersqliteplugin.galaxyworld.org
GNU Lesser General Public License v2.1
380 stars 155 forks source link

db.setConnectOptions("QSQLITE_CREATE_KEY"); it 's not work! #14

Open refinement opened 6 years ago

refinement commented 6 years ago

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.