Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How do you place row labels (VerticalHeaderLabels) on RHS of QTableWidget?
Row labels for a QTableWidget always seem to go on left side of the table (e.g. calling setVerticalHeaderLabels). Is there some way to set them on right hand side instead? I would have thought setVerticalHeaderLabels would have a second argument for an enum to specify placement.
VRonin last edited by
I would have thought setVerticalHeaderLabels would have a second argument for an enum to specify placement.
That's impossible as
setVerticalHeaderLabelsis a method of the model which has no idea how the data it holds is displayed.
Shooting in the dark here but see if
verticalHeader()->setOffset(100)has any effect
@VRonin Sorry, verticalHeader()->setOffset(100) has no apparent effect.
Hi and welcome to devnet,
Why do you want to put them on the right side ?
@SGaist Table columns are years ; for example 2000-2017. It would be nice if row labels were near the more recent years instead of being at left and having to scan across a wide table. Reversing order of columns would be unnatural.