PDA

View Full Version : swap headers in QTableView



dimixan
21st May 2008, 15:49
Hello,

What is the easiest way to do the following in a QTableView:

X| A B C
--------------
D|
E|
F|

convert to:

X| D E F
--------------
A|
B|
C|


To be more accurate, I have a QSqlTableModel via which I populate a QTableView. Now instead of showing the database entries (records) in each row of the view, I would like to show them in every column of the view.

Thank you

(P.S. my ascii art sucks, freel free to spit me :P)

jpn
22nd May 2008, 22:18
See Transpose proxy model.

dimixan
26th May 2008, 21:44
Thank you very much. That was exactly what I was looking for