The problem is, the ownership and affinety of the QSqlQuery must be the same
as the QSqlDatabase (This from Bill King of Nokia who is the/one of Nokia's
Qt database guys)
So what I got working, is creating the QSqlDatabase and its connection
inside the thread (during the run phase), running the exec and emitting a
signal when finished.
Once its finished, then you can use the QSqlQuery from the other thread
Note, I have NOT tried modifying the QSqlQueyrModel, I would expect that if
you got the QSqlRecord from the thread it would be ok..
On 6/8/10 1:16 AM, "Linos" <info@xxxxxxxx> wrote:
> I am using something like this with pyqt, the only difference it is that i
> the QSqlQuery in a signal when the query has finished instead of return it
> a method, but when later i execute other query in the same sql QThread with a
> new created QSqlQuery in the same QSqlDatabase connection of the thread, the
> first model get corrupted and gets the values of the last query.
> Miguel Angel
> El 08/06/10 07:53, Scott Bloom escribió:
>> It got stripped.. My sent items has it attached...
>> It was/is a zip file...
>> On 6/7/10 10:23 PM, "Andre Somers"<andre@xxxxxxxxxxxxxxxx> wrote:
>>> Op 8-6-2010 0:22, Scott Aron Bloom schreef:
>>>> I have attached a working solution. Its not fully vetted, so bugs
>>>> probably exist :) but it works in the case shown...
>>> Unfortunately, you have attached nothing...
>>> Qt-interest mailing list
>> Qt-interest mailing list
Qt-interest mailing list