[Interest] how do I load massive table views instantly?

Scott Bloom scott at towel42.com
Tue Jun 9 02:07:36 CEST 2020


BTW.. I missed that you are using QSRTM, since you are use QSRTM, you shouldn’t need to use any proxy model.

Simply use the setFilter and setOrder methods.  The setOrder should be handled automatically by your view when you set the model, and enable sorting on the view.

Scott

-----Original Message-----
From: Interest <interest-bounces at qt-project.org> On Behalf Of David M. Cotter
Sent: Monday, June 8, 2020 4:43 PM
To: interest at qt-project.org
Subject: Re: [Interest] how do I load massive table views instantly?

right okay so my source model class is QSqlRelationalTableModel, no subclass.

does this answer your question?

sorry i'm still learning about this stuff.

now that you know that, is it easier to answer my original question?


> On Jun 8, 2020, at 1:37 PM, Francis Herne <mail at flherne.uk> wrote:
> 
> On Friday, 5 June 2020 17:23:37 BST David M. Cotter wrote:
>>>>> What table view are you talking about, specifically?
>>>> 
>>>> QTableView with QSortFilterProxyModel
>>> 
>>> What is the model _behind_ QSFPM?
>> 
>> i'm trying to understand your question. i'm not sure what you mean, 
>> cuz i'm not the SQLite dev what i know is that each song has a couple 
>> dozen bits of data (name, artist, album, several file paths, rating, 
>> duration etc etc) besides that, what are you asking?=
> 
> QSortFilterProxyModel is a *proxy* that makes other models sortable.  
> it only works when its `sourceModel` property is set to an instance of 
> a different model class that actually contains the data.

_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list