[Interest] About model/view sorting and headers
Jason H
scorp1us at yahoo.com
Mon Mar 5 15:58:12 CET 2012
It would seem as your row header isn't header, but data?
________________________________
From: Yves Bailly <yves.bailly at sescoi.fr>
To: "interest at qt-project.org" <interest at qt-project.org>
Sent: Monday, March 5, 2012 8:31 AM
Subject: [Interest] About model/view sorting and headers
Greetings all,
Here's something it seems I can't understand.
Let's say I have a model, a subclass from QStandardItemModel, filled
with a table-like set of data, creating as much QStandardItem as needed
and calling QStandardItemModel::appendRow(). This model contains both
an horizontal header (things like "ID", "Name", ...) and a vertical
header (things like "rec1", "rec2", ...).
This model is displayed in a standard QTableView, which allows sorting
simply by clicking on the horizontal header. When I click, the rows are
sorted, fine... but the rows' *headers* are not sorted.
What am I missing here? How can I get the vertical header to be sorted
just like the rows are sorted?
Thanks for any hint!
--
/- Yves Bailly - Software developper -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120305/1629e14b/attachment.html>
More information about the Interest
mailing list