PyQt Table Header Align

628 views
Skip to first unread message

Ruchit Bhatt

unread,
Jun 2, 2017, 8:20:49 AM6/2/17
to Python Programming for Autodesk Maya

Hi,
How to align column header in tableView or tableWidget vertically like in Maya weight editor ??


See this




Justin Israel

unread,
Jun 2, 2017, 6:33:51 PM6/2/17
to Python Programming for Autodesk Maya


On Sat, Jun 3, 2017, 12:20 AM Ruchit Bhatt <ruchitinn...@gmail.com> wrote:

Hi,
How to align column header in tableView or tableWidget vertically like in Maya weight editor ??


Have you tried setting the text orientation on the header? 


The header can be accessed on the table view:



See this




--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/54f921d9-1a99-49e6-8c0b-6c8b638f8cd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruchit Bhatt

unread,
Jun 3, 2017, 12:00:01 PM6/3/17
to Python Programming for Autodesk Maya
Qt Alignment has option like
AlignLeft, AlignRight, AlignHCenter, AlignJustify, AlignAbsolute, AlignTop, AlignBottom, AlignVCenter, AlignCenter

still no idea about how to rotate,

Justin Israel

unread,
Jun 3, 2017, 4:48:50 PM6/3/17
to Python Programming for Autodesk Maya
Oh sorry about that. My mistake. 

Looks to be something you need to implement yourself in a custom QHeaderView by defining paintSection and sizeHint



--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Ruchit Bhatt

unread,
Jun 7, 2017, 8:08:28 AM6/7/17
to Python Programming for Autodesk Maya
@Justin
Using info from given link, i m able to rotate header but size of header is still not proper.
Any idea how to fix that??
see attach file for code.

Thank you
junkTable.py

Justin Israel

unread,
Jun 7, 2017, 8:24:43 AM6/7/17
to Python Programming for Autodesk Maya
Try implementing sizeHint() in your custom header to return a reasonable size that account for the height. 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages