문제

By default, the text is always on the right-side of the tab icon...
What should I do to move the text to the bottom of it ?
And is there an option to do icon/text alignment ??

(I'm designing the GUI base on Qt Creator Designer.
I'm trying with Qt stylesheet but I can't. I have not yet modify the code that generated by Qt Designer.)

Thank you very much!

올바른 솔루션이 없습니다

다른 팁

A tricky way:

Since we can set QToolButton to be icon above text, just create a group of QToolButtons, listed horizontally or vertically, each button needs to be checkable. Add them to a QButtonGroup.

Then hide the TabBar of QTabWidget(out of parent widget or under ToolButtons), place the TabWidget under the listed ToolButtons.

Finally, connect the QButtonGroup buttonClicked signal to the TabWidget's setCurrentIndex signal.

Notice, when you add a button to QButtonGroup, you will have to assign the ID from 0 manually.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top