C++ (Qt)QSqlDatabase db = QSqlDatabase::addDatabase("ConnectionName", "QSQLITE");....db.open();
C++ (Qt)QSqlQuery query (QSqlDatabase::database("ConnectionName"));
if(!db.open())...
if(!db.isOpen())...
C++ (Qt)if (!QSqlDatabase::database("ConnectionName").isOpen())
if (QSqlDatabase::contains("DBCONN"))...
C++ (Qt)QSqlDatabase db = QSqlDatabase::addDatabase("ConnectionName", "DriverName");qDebug () << QSqlDatabase::contains("ConnectionName") << QSqlDatabase::database("ConnectionName").isOpen();db.open();qDebug () << QSqlDatabase::contains("ConnectionName") << QSqlDatabase::database("ConnectionName").isOpen();