Qt-interest Archive, March 2002
tab order between two widgets
Message 1 in thread
I have a custom password dialog widget that contains two line edits
( username,password ) a checkbox to save the password, and two buttons
( OK, Cancel ).
How can I set the tab ordering to just toggle between the two line edits
and the checkbox, and not include the buttons? I tried setTabOrder in
the following manner without success:
setTabOrder( line1, line2 );
setTabOrder( line2, checkbox );
setTabOrder( checkbox, line1 );
--
[ signature omitted ]
Message 2 in thread
Brian Wotring wrote:
Brian,
> I have a custom password dialog widget that contains two line edits
> ( username,password ) a checkbox to save the password, and two buttons
> ( OK, Cancel ).
>
> How can I set the tab ordering to just toggle between the two line edits
> and the checkbox, and not include the buttons? I tried setTabOrder in
> the following manner without success:
>
> setTabOrder( line1, line2 );
> setTabOrder( line2, checkbox );
> setTabOrder( checkbox, line1 );
Not sure but try to remove the last line.
from the docs of setTabOrder ( as of Qt3.0.0.beta6 ) :
<snip>
Note that since the tab order of the second widget is changed, you should
order a chain like this:
setTabOrder( a, b ); // a to b
setTabOrder( b, c ); // a to b to c
setTabOrder( c, d ); // a to b to c to d
</snip>
>
>
> --
> Brian Wotring ( brian@shmoo.com )
> PGP KeyID: 0x9674763D
>
> --
> List archive and information: http://qt-interest.trolltech.com
--
[ signature omitted ]
Message 3 in thread
Hi,
> How can I set the tab ordering to just toggle between the two line edits
> and the checkbox, and not include the buttons? I tried setTabOrder in
> the following manner without success:
you could try setFocusPolicy(NoFocus) on your buttons.
Bye,
Bernd