[Qt-interest] GUI, Qt, Sorting, QTableWidget, NO sorting even after setSortingEnabled()
Mandaya Prakash
mandaya.prakash at gmail.com
Wed Aug 4 20:19:00 CEST 2010
Hi All,
My company has now started usin Qt and I am having some probelm with
QTableWidget sorting.
I have a QTableWidget. And I fill it with some QTableWidgetItem, initiated
by simple QString,
actually, just a number like 1,2,10, etc. The problem is that when I set
tableWidget->setSortingEnabled(true); and then sort by this column, the
order is 1,10,2..., looks like it's compared as string.
I don't want to change the code a lot (e.g., creating a customized
sub-class) to make it sort correctly. So is there any option of the
table/item that I can just set to make it work?
Thank you in advance
BR
Prakash.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100804/cba79c54/attachment.html
More information about the Qt-interest-old
mailing list