QSqlQuery - exec in one thread, read result in another. Is it legal?
napajejenunedk0 last edited by
As the topic says: I have an QSqlQuery created in one thread, but I want to read the results of the query in another one. Is it legal?
It should be born in mind that one should have a QSqlDatabase per thread as denoted in this topic by JKSH. So, I actually have two db connections for both threads - db thread and the main one. I execute some small stuff in the main one, but mainly read the results of the secondary thread. Is it legal? Does the db cursor in the query gets messed up when it is incremented due to reading the query or etc.?