Hi all!
I'd like to customize QToolBox. By default, the tab header text is aligned to left. It is necessary to align it to center horizontally. I can't find a way to do it. Is it possible?
Printable View
Hi all!
I'd like to customize QToolBox. By default, the tab header text is aligned to left. It is necessary to align it to center horizontally. I can't find a way to do it. Is it possible?
I guess using style sheets is the easiest way.
http://doc.trolltech.com/4.5/stylesheet.html
I would try something like:
text-align only works with QPushButton and QProgressBar anyways, so that's not going to work. Since ::tab is a sub-control, have you looked at using the subcontrol-origin and subcontrol-position properties? This may just align the tab within the tool box though. The brute force way, though, may have to be manually padding the text and looking at the results unless someone has specifically encountered your problem before.