views:

214

answers:

1

Is there a way to change the alignment of the icon or text of a tab in Qt? Specifically, I would like the text to appear below the icon. By default the icon sits to the left of the text, but that's not appropriate for all situations (especially when you start styling your tabs with stylesheets) It would seem very odd to me that this aspect would be so restricted when I can completely alter the look and feel of the rest of the tab.

Thanks for any suggestions!

A: 

The only way I can see is to create a subclass of QTabBar that implements your own painting algorithm. Then you'd need to subclass QTabWidget to set your own version of the tab bar. It doesn't look like a lot of fun to me.

Caleb Huitt - cjhuitt
Yeah, that doesn't sound like my idea of fun either. I wonder if they restrict that for cross platform reasons. hm... Now I'm tempted to try and correct that in the source and submit it back to Nokia as a patch. Can't imagine I'd be the only one who would find that useful.
Toji