In a QTableView
I need the last (rightmost) column to be empty, expandable but not movable. The goal is that the table not to suddenly end (for I use alternate color for rows) or to ugly expand to the right. In QHeaderView
there is a setFirstSectionMovable(bool)
; I need something similar for the last section, letting the rest of them movable. (in other words: Fill the rest of the table with an empty not movable column). Any clue how to acheive this?
I did override mousePressEvent()
in a subclass of QHeaderView
to skip the last section but it still can be moved by moving other column in its place and I don't know how to prevent this.