[Interest] Customzie Qtablemodel and selectionmodel.

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Jun 17 14:10:48 CEST 2020


Il 17/06/20 07:49, Milos Top ha scritto:
> But I can not implement "SelectionModel" on this model.
> For example, I want to select first record and last record.
> For now, If I select the first record and scroll to down then, I can not 
> keep selections because the model is changed by scrolling.

How is the model changed by scrolling, exactly?

The issue with selection is that you need an valid index representing 
the last entry. So, you may lazy load the model data (based on views' 
requests), but the row count has to be accurate immediately. More than 
doable, anyhow.

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200617/a73e940f/attachment.bin>


More information about the Interest mailing list