Apin
Apin

Reputation: 2668

Qt MySQL driver not support transaction

I am working on Qt Ubuntu 16.04 and install all required qt using apt-get install. And install mysql driver by :

apt-get install libqt5sql5-mysql

But the problem is that the driver does not support transaction. I check using this code :

auto database = QSqlDatabase::addDatabase("QMYSQL", "TEST");
qDebug() << database.driver()->hasFeature(QSqlDriver::Transactions);
//it printed false

How to make the driver has feature transaction?

Upvotes: 1

Views: 644

Answers (1)

Apin
Apin

Reputation: 2668

When I check after the connection open, the feature is available.

Upvotes: 1

Related Questions