[Qt-interest] QSqlQueryModel with QSortFilterProxyModeldoesn'tupdate properly

Scott Aron Bloom Scott.Bloom at onshorecs.com
Mon Jan 17 18:14:39 CET 2011


I had worked on, but never finished, a patch to the proxy filter model to auto call the fetchmore till its available rows was enough to populate the screen.

-----Original Message-----
From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com [mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On Behalf Of Daniël de Kok
Sent: Monday, January 17, 2011 9:06 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] QSqlQueryModel with QSortFilterProxyModeldoesn'tupdate properly

On Jan 17, 2011, at 5:54 PM, Scott Aron Bloom wrote:
> QSqlQueryModel does not download/receive all the matching rows at once.. what you are seeing is the effects of this...
> 
> One way to fix this is after you call setQuery (after calling query.exec() ) is to do a 
> While( model->canFetchMore() ) { model->fetchMore(); }
> 
> However, for large SQL queries this can be quite a few iterations.

Thank you! Then I'll define a regexp() user function in SQLite.

Kind regards,
Daniël de Kok
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest



More information about the Qt-interest-old mailing list