[Interest] QSqlQuery

Igor Mironchik igor.mironchik at gmail.com
Sun Jan 26 16:29:19 CET 2014


Hi.

I have some questions about database support in Qt 5.

First of all, is it safe to transfer a QSqlQuery instance from one 
thread to another to process him in another thread. I.e. I want to 
execute SELECT query on "DB" thread and return a QSqlQuery from that 
thread to the GUI thread, where I will navigate and show users the 
result of the query.

And the second question, I've found the following warning in the 
documentation:

"For some databases, if an active query that is aSELECTstatement exists 
when you callcommit() 
<qthelp://org.qt-project.qtsql.520/qtsql/qsqldatabase.html#commit>orrollback() 
<qthelp://org.qt-project.qtsql.520/qtsql/qsqldatabase.html#rollback>, 
the commit or rollback will fail. SeeisActive 
<qthelp://org.qt-project.qtsql.520/qtsql/qsqlquery.html#isActive>() for 
details."

Does the SQLite driver has that pain?

Thanks.

-- 
Best Regards,
Igor Mironchik.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140126/aba1e235/attachment.html>


More information about the Interest mailing list