[Qt-interest] QTabBar previous page index

Ulf-Alexander v. Ceumern-Lindenstjerna ceumern at vrmagic.com
Wed Jan 27 09:52:09 CET 2010


Hi.

It seems like the api does not support that feature, but you could try
to install an event filter which intercepts say the mouseReleaseEvent,
stores the current page index and then let QTabBar process the mouse
event. This could work w/o having to subclass QTabBar, so I would give
it a try.

HTH, Ulf

> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Santhosh Y
> Sent: Wednesday, January 27, 2010 8:14 AM
> To: qt-interest at trolltech.com
> Subject: [Qt-interest] QTabBar previous page index
> 
> Hi,
> 
> How to know previous page index of QTabBar, when user has switched
from
> one page to other page.
> 
> I have seen the QTabBar, signals
> 
> 
> 1.
> 	void currentChanged ( int index )
> 
> 
> 	*	Using this I can only know the current index. But I
would
> like to know the previous page of QTabBar.
> 
> 2.
> 	void QTabBar::tabMoved ( int from, int to )   [signal]
> 
> 	*	This is not emitted when user switches from one tab to
the
> other.
> 
> 
> There is a method currentIndex(), which can give me the current
> page.But  there is no api, which can give me the previous page.
> 
> Please suggest me how to know the previous page index.
> 
> Thanks
> Santhosh
> 
> --
> ----------------------------------------------------
> Y Santhosh Kumar -
> Senior Software Engineer,
> SoftJin Technologies Pvt Ltd,
> www.softjin.com
> ----------------------------------------------------
> 
> 
> Business Disclaimer
> ____________________________________________________________
> This e-mail message and any files transmitted with it are intended
> solely for  the use  of the  individual or entity  to which they  are
> addressed. It may  contain confidential,  proprietary or legally
> privileged  information.
> If  you  are  not  the  intended recipient please be advised that you
> have received  this  message in error and any use is strictly
> prohibited. Please immediately  delete it  and all copies of it from
> your system, destroy any hard  copies  of  it and  notify  the  sender
> by return mail. You must not, directly or indirectly, use,  disclose,
> distribute, print, or copy any part of this message if you are not the
> intended recipient.
> ___________________________________________________________




More information about the Qt-interest-old mailing list