M_db=QSqlDatabase: : addDatabase (" QSQLITE ", "QSQLITE");
M_db. SetDatabaseName (" D: \ CameraDB. Sqlite ");
BRet=m_db. The open ();
====error usage:
M_db=QSqlDatabase: : addDatabase (" QSQLITE ", "QSQLITE");
M_db. SetDatabaseName (" D: \ \ CameraDB sqlite ");
BRet=m_db. The open ();
=====read strPath right
[the System]
Path=d: \ \ Test \ \ MyDir
QSettings CFG (" D: \ \ config ini ", QSettings: : IniFormat);
QString strPath=CFG. Value (System/" Path ", ""). The toString ();
=====read strPath error
[the System]
Path=d: \ Test \ MyDir
QSettings CFG (" D: \ \ config ini ", QSettings: : IniFormat);
QString strPath=CFG. Value (System/" Path ", ""). The toString ();
Who can summarize,
CodePudding user response:
QT framework upset ah, why configuration file with two slashes ahCodePudding user response:
Always use "/" no matter what the platform.