[Qt-interest] QSqlDatabase in multi-threaded environment.

BOUCARD Olivier boucard_olivier at yahoo.fr
Fri Jun 3 20:38:48 CEST 2011


Hi all,

My question is about QSqlDatabase and multi-thread.
In the documentation, I can see that "A connection can only be used from within the thread that created it", ok I can live with this.
But, do I have to name my database connection differently from each thread? Or the default connection will work as the QSqlDatabase::database function only see the connections created within the same thread?

Thank you for your answers.

Olivier.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110603/bcc5f39f/attachment.html 


More information about the Qt-interest-old mailing list