Qt-interest Archive, November 2006
QTableView - sectionClicked - sortByColumn [4.1.4]
Message 1 in thread
Goal: I want to sort a QTableView whenever the user clicks on a column's
header.
Problem: I've tried it with
connect(itemTable->horizontalHeader(),SIGNAL(sectionClicked(int)),
itemTable, SLOT(sortByColumn(int)));
but that didn't work. I read quite a few things e.g.
http://www.qtcentre.org/forum/archive/index.php/t-467.html
<http://www.qtcentre.org/forum/archive/index.php/t-467.html>
http://www.qtforum.de/forum/viewtopic.php?p=10946&sid=24d1e9342d43354969
0e362ac02176bf
<http://www.qtforum.de/forum/viewtopic.php?p=10946&sid=24d1e9342d4335496
90e362ac02176bf>
about it which said (at least my conclusio) that this is/has
been a Qt-internal bug/issue.
Does anybody know in which Qt version this matter will be solved?
Is there another "affordable" way to do it?
Thanks for your answers,
r.
--------------------------------------------------------------------
Rene Kaiser
Institute of Information Systems & Information Management
JOANNEUM RESEARCH Forschungsgesellschaft mbH
Steyrergasse 17, A-8010 Graz, AUSTRIA
phone: +43-316-876-1173 fax: +43-316-876-1191
web: http://www.joanneum.at/iis <http://www.joanneum.at/iis>
e-mail: mailto:rene.kaiser@xxxxxxxxxxx
<mailto:rene.kaiser@xxxxxxxxxxx>
--------------------------------------------------------------------
Message 2 in thread
You should also execute a "select" on your model to refresh the query.
Stefano Rosellini.
--
[ signature omitted ]