Project

General

Profile

Sort Data in Tableview

Added by Lamiel Toch about 6 years ago

Hello,

I use the WTableView widget, and I would like to sort a column according to the data and not according to the displayed text (which is the default behaviour).

How can I proceed ?

May you help me ?

thank you in advance!

best regards.

Lamiel


Replies (1)

RE: Sort Data in Tableview - Added by Wim Dumon about 6 years ago

Several models have a setSortRole() methods that allow you to do exactly this. In WSortFilterProxyModel, you can reimplement lessThan() as alternative.

Best regards,

Wim.

    (1-1/1)