[Qt-interest] QWidget::SetTabOrder question?

Eric Clark eclark at ara.com
Tue Aug 10 23:23:17 CEST 2010


Sorry about sending this to you directly Jeff.

-----Original Message-----
From: Eric Clark 
Sent: Tuesday, August 10, 2010 4:22 PM
To: 'Jeffery MacEachern'
Subject: RE: [Qt-interest] QWidget::SetTabOrder question?

I guess I could call it until there is no previous... What I really have is a collection of widgets (two or more) that are linked via the setTabOrder function. When I get to the last widget, I would like to link that widget back to the first widget in the chain to have the last tab go back to the beginning. By the time I get to the last widget, I no longer know the first widget in the chain. I was hoping to find a function where I could index the chain or get the first widget in the chain easily without having to keep calling previousInFocusChain over and over until there is no previous. I was unaware of the functions you gave me, so I will probably, for now, write a function that gets the first by calling previousInFocusChain until no more. Can you tell me if these functions are strictly used for the tab order? Or do the functions include Qt's default tab order? What I mean is, if I call previousInFocusChain recursively until it returns 0, will that widget be the first widget in my tab order?

Thanks,
Eric

> -----Original Message-----
> From: Jeffery MacEachern [mailto:j.maceachern at gmail.com]
> Sent: Tuesday, August 10, 2010 4:14 PM
> To: Eric Clark
> Cc: Qt Interest (qt-interest at trolltech.com)
> Subject: Re: [Qt-interest] QWidget::SetTabOrder question?
> 
> Is QWidget::{next,previous}InFocusChain() what you're looking for?
>  - Jeffery MacEachern
> 
> 
> 
> On Tue, Aug 10, 2010 at 12:59, Eric Clark <eclark at ara.com> wrote:
> > Hello All,
> >
> >
> >
> > I was wondering if there is a way to get the tab order after it has 
> > already been set. For example, if I have this:
> >
> >
> >
> > QWidget *widget1 = new QWidget();
> >
> > QWidget *widget2 = new QWidget();
> >
> >
> >
> > QWidget::setTabOrder(widget1, widget2);
> >
> >
> >
> > Is there any way for me to ask what widget is first in the order and 
> > get back a pointer to widget1?
> >
> >
> >
> > Thank you in advance!
> >
> > Eric
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> >




More information about the Qt-interest-old mailing list