PDA

View Full Version : QTabWidget tab height



drkbkr
31st May 2007, 20:46
Hi,

I'm trying to alter the height of the tabs in my QTabWidget. I've tried to set a corner widget with the desired height, use an icon to stretch it taller, set the height on the tabBar itself, setting a global strut on the entire application (which has some effect, but not nearly the desired one), and probably a few other things I can't think of right now. None of it has any effect. Does anyone know if this is possible, and if so, how to do it?

Thanks,
Derek

guilugi
1st June 2007, 09:32
I didn't really try, but maybe this property of QStyle could help you : that implies to subclass QStyle of course, which is really easy ;-)

This a pixel metric property :

QStyle::PM_TabBarTabVSpace -> Extra space added to the tab height.

drkbkr
1st June 2007, 14:53
Thanks, but that had no effect either. And I poked around and found the following the code for the QTabBar class:


// Since tab widget is rather *ahem* strict about keeping the geometry of the
// tabbar to its absolute minimum...

So basically, I think I'm writing my own (which I might have had to do anyway since crazy graphic designers want non-standard shapes for the tabs).

Derek

chikkireddi
29th October 2007, 12:58
How did you solved this problem. I am also had same problem. I want to increase the height of QTabBar

Thanks
C