Answer the question
In order to leave comments, you need to log in
Does QSqlQuery hold a smart DB pointer?
There are three questions.
1. Is QSqlDatabase a smart pointer? What will happen from such a code?
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
// ну, в общем, откроем его…
QSqlDatabase dbCopy = db;
QSqlQuery getQuery() {
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
// в общем, откроем…
return QSqlQuery("SELECT * FROM table", db);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question