View Full Version : How to put a vertical header of a QTableWidget on the right side of the table?
Lunochod
27th November 2007, 12:46
Hello,
I'm trying to create a table with a vertical table header on the right side of the table.
Is this possible?
Thanks in advance,
Lunochod
wysota
27th November 2007, 12:50
Yes, it should be possible. You'd need to subclass the table, use QWidget::setContentsMargins to make a margin on the right of the widget instead of the left one and reimplement resizeEvent to adjust the geometry of the header.
mrvk
20th January 2011, 12:49
Do we need to do that now Or do we have any property to move the vertical header to the right with the more latest versions of Qt ?
wysota
20th January 2011, 13:24
The vertical header is always on the left unless you set your widget to a right-to-left layout (but this will reverse all the contents as well, column 0 will be most-right, etc.). If you wish to override this behaviour, you're on your own.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.