Qt-solutions Archive, February 2007
Sort numerically QTableWidget
Message 1 in thread
Hi All,
My application required sorting of all rows, function "sortByColumn( )" sort all row alphabetically by comparing
string. I want to sort it numerically. Please suggest some way.
Vijay
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
Message 2 in thread
Its actually sorting on data( DisplayRole) you need to override the sort
method on the view and/or model.
Scott
________________________________
From: Vijay_Mehta [mailto:Vijay_Mehta@xxxxxxxxxx]
Sent: Thursday, February 22, 2007 7:58 PM
To: qt-solutions@xxxxxxxxxxxxx
Subject: Sort numerically QTableWidget
Hi All,
My application required sorting of all rows, function "sortByColumn( )"
sort all row alphabetically by comparing
string. I want to sort it numerically. Please suggest some way.
Vijay
DISCLAIMER:
This email (including any attachments) is intended for the sole use of
the intended recipient/s and may contain material that is CONFIDENTIAL
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or
copying or distribution or forwarding of any or all of the contents in
this message is STRICTLY PROHIBITED. If you are not the intended
recipient, please contact the sender by email and delete all copies;
your cooperation in this regard is appreciated..