hi,all
I have a problem about QTabBar. please help me.
I want to subclass QTabBar and implement a tabbar like
_____
|__/__|
thanks.
hi,all
I have a problem about QTabBar. please help me.
I want to subclass QTabBar and implement a tabbar like
_____
|__/__|
thanks.
Could you be more specific? Did you notice QTabBar::setShape(QTabBar::Triangular..)?
J-P Nurmi
thanks for your reply.
I've noticed the shape provided by QTabBar. and i just want to design the shape of the tab nonrectangle, like the above image.
I would probably go with implementing a custom style. It's possible to change the appearance by overriding QTabBar::paintEvent(), but if you draw the tabs with different geometries than the normal implementation assumes, most functionality with the tab bar will most probably be broken.
Last edited by jpn; 10th October 2006 at 09:36. Reason: Disabled smilies
J-P Nurmi
thanks.
i found it really difficult to set the tabs different geometry. i give it up.
i have another question.
sometimes i just want to rearrange the layout the widgets, but QT mostly designs the layout funtion private or uses d-pointer in it. so it is impossible to subclass the widgets to override the layout funtions.
for example,I tried to modify QSpinBox to place the buttons on the left and right of the text area instead of on the right above one another.
The layout function is private. so i had to copy the entire class into my project and revise it instead of simply subclassing it.
Bookmarks