PDA

View Full Version : [itemView] QHeaderView lose mapping at column insertion



lauranger
16th August 2006, 14:39
Hi
When one adds a column in its itemModel the QHeaderView associated to an itemView showing the said model will flatten its logical/visual mapping.
Say, you have columns A, B, C in your model, and visually you managed to get C, A, B.
Then when your model gets another column, say D, you get visually :
A, B, C, D.
Quite drastical, isn't it ? I waited for C, A, B, D.
I did not find a report for that. Do you think this is a bug or a feature ?

gfunk
16th August 2006, 19:18
Ick... the last time I got into the convoluted mess of inserting and moving sections around in the header (I was trying to use the builtin QSqlRelationalTableModel at the time), I eventually surrendered, and found it much easier and cleaner to write my own model class, rather than try to hack around theirs. YMMV !