[Qt-interest] Allow sorting only for one column of theQTableWidget
Iurii Gordiienko
hordi at ukr.net
Wed Mar 25 12:59:44 CET 2009
Thank you... I think your algorithm should work. I will try..
--- Original Message ---
From: "Malyushytsky, Alex" <alex at wai.com>
To: "qt-interest at trolltech.com" <qt-interest at trolltech.com>
Date: 25 march, 11:18:06
Subject: Re: [Qt-interest] Allow sorting only for one column of theQTableWidget
I don't have QT 4.5.
What I would try in QT 4.4:
- disable sorting completely: void setSortingEnabled ( bool enable )
- make horizontalHeader () clickable - setClickable ( bool clickable )
- create custom slot which will ignore event or call sortByColumn(... ) or sortItems( ); // I have no idea why developers did not make them virtual
- connect your custom slot to one of the horizontal header
( QHeaderView * horizontalHeader () const )
signals ( potentially - sectionClicked ( int logicalIndex ) )
Hope this helps, I have not tried it.
Regards,
Alex
________________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Iurii Gordiienko
Sent: Wednesday, March 25, 2009 12:07 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Allow sorting only for one column of the QTableWidget
Hi
I need allow sorting only for one column of the QTableWidget. How can I forbid the Sorting of others colums from QTableWidget?
Qt-4.5
Thanks
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
--
Якими будуть медіа ХХІ століття?
http://ubr.ua.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090325/2affdeb0/attachment.html
More information about the Qt-interest-old
mailing list