I'm adding a database using the driver QPSQL7 :
...
m_db.setHostName(strHostName.c_str());
m_db.setDatabaseName(strDatabaseName.c_str());
m_db.setUserName(strUserName.c_str());
m_db.setPassword(strPassword.c_str());
m_db.setPort(iPort);
...
m_db = QSqlDatabase();
...
m_db = QSqlDatabase::addDatabase(strType.c_str(), DB_NAME);
m_db.setHostName(strHostName.c_str());
m_db.setDatabaseName(strDatabaseName.c_str());
m_db.setUserName(strUserName.c_str());
m_db.setPassword(strPassword.c_str());
m_db.setPort(iPort);
...
To copy to clipboard, switch view to plain text mode
while calling:
m_db.open();
m_db.open();
To copy to clipboard, switch view to plain text mode
my app blocks for about two seconds
Bookmarks