Qt-interest Archive, December 2006
Tabs and Close button
Message 1 in thread
Hi,
I want to have a Tab Widget with Close (x) button on each tab.
As per my understanding, I would have to:
Subclass QTabBar
Set size hint as required
Override paint event
Write code for painting Close button on each tab.
Connect close button click to close Active Tab.
Is there any better way?
If not then, how to put Close button on each tab.
If I use QStyleOptionButton then it seems like a lot of code to write
for achieving whole look and feel of button , like Pressed status etc
Any advice is greatly appreciated.
Thanks.