Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, December 2006
TabWidget border


Message 1 in thread

Hi,
 
I want to know how to remove the border around the QTabWidget.
For Example with widgets inheriting from QFrame you can set
QFrame::NoFrame.
 
I tried to derive a class from QTabWidget and override the PaintEvent
method to draw rect around the TabWidget with QPalette::Window color.
But not satisfied with results.
Please let me know if there is any better way of doing it?
 
Thanks Much

Message 2 in thread

Can any one please comment on this. I need it badly. Thanks.

________________________________

From: Jaya Meghani [mailto:Jaya.Meghani@xxxxxxxxxx] 
Sent: Wednesday, December 13, 2006 11:16 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: TabWidget border


Hi,
 
I want to know how to remove the border around the QTabWidget.
For Example with widgets inheriting from QFrame you can set
QFrame::NoFrame.
 
I tried to derive a class from QTabWidget and override the PaintEvent
method to draw rect around the TabWidget with QPalette::Window color.
But not satisfied with results.
Please let me know if there is any better way of doing it?
 
Thanks Much

Message 3 in thread

I haven't tried this, but you may be able to subclass the appropriate  
QStyle and reimplement the drawPrimitive function to ignore the  
QStyle::PE_FrameTabWidget primitive.  It looks fairly  
straightforward.  The downside of this approach is that you would  
have to have a specialized QStyle subclass for each platform where  
the frame isn't desired.

Jason Haslam


On Dec 14, 2006, at 12:31 PM, Jaya Meghani wrote:

> Can any one please comment on this. I need it badly. Thanks.
>
> From: Jaya Meghani [mailto:Jaya.Meghani@xxxxxxxxxx]
> Sent: Wednesday, December 13, 2006 11:16 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: TabWidget border
>
> Hi,
>
> I want to know how to remove the border around the QTabWidget.
> For Example with widgets inheriting from QFrame you can set  
> QFrame::NoFrame.
>
> I tried to derive a class from QTabWidget and override the  
> PaintEvent method to draw rect around the TabWidget with  
> QPalette::Window color. But not satisfied with results.
> Please let me know if there is any better way of doing it?
>
> Thanks Much


Message 4 in thread

Will try the approach. Thanks.

________________________________

From: Jason Haslam [mailto:jason@xxxxxxxxxxxx] 
Sent: Thursday, December 14, 2006 3:09 PM
To: Qt Interest
Subject: Re: TabWidget border


I haven't tried this, but you may be able to subclass the appropriate
QStyle and reimplement the drawPrimitive function to ignore the
QStyle::PE_FrameTabWidget primitive.  It looks fairly straightforward.
The downside of this approach is that you would have to have a
specialized QStyle subclass for each platform where the frame isn't
desired. 

Jason Haslam


On Dec 14, 2006, at 12:31 PM, Jaya Meghani wrote:


	Can any one please comment on this. I need it badly. Thanks.

________________________________

	From: Jaya Meghani [mailto:Jaya.Meghani@xxxxxxxxxx] 
	Sent: Wednesday, December 13, 2006 11:16 AM
	To: qt-interest@xxxxxxxxxxxxx
	Subject: TabWidget border
	
	
	Hi,
	 
	I want to know how to remove the border around the QTabWidget.
	For Example with widgets inheriting from QFrame you can set
QFrame::NoFrame.
	 
	I tried to derive a class from QTabWidget and override the
PaintEvent method to draw rect around the TabWidget with
QPalette::Window color. But not satisfied with results.
	Please let me know if there is any better way of doing it?
	 
	Thanks Much