[Qt-qml] Dynamically changing Keynaviagtion

Christoper Ham christopher.ham at nokia.com
Thu Feb 10 04:22:46 CET 2011


On 02/10/2011 12:08 PM, ext amit shah wrote:
> Hi
> I have 3 components
>
>         GroupA{
>             id: groupA;
>             focus: true;
>             KeyNavigation.right:groupB
>
>         }
>
>         GroupB{
>             id: groupB
>              KeyNavigation.left:groupA
>              KeyNavigation.right:groupC
>
>
>         }
>
>         GroupC{
>             id: groupC
>              KeyNavigation.left:groupB
>
>         }
>
> The KeyNavigation is configured as
>
> GroupA<-->  GroupB<-->  GroupC
>
> and the behavior is as desired.
>
> Is there a way if GroupB is hidden dynamically via code (visible=false)  I
> should be still able to navigate between groupA&  groupB.
> That is
> GroupA<-->  GroupC
>
> I tried reconfiguring the KeyNavigation for on groupA&  groupB on GroupB's
>   onVisibleChanged but was unable to do so.
>
> onVisibleChanged: {
>                  if (groupB.visible){
>                      groupB.KeyNavigation.left=(groupA);
>                      groupB.KeyNavigation.right=(groupC);
>
>                  }
>                  else{
>                     groupA.KeyNavigation.right=groupC;
>                      groupC.KeyNavigation.left=groupA;
>                  }
>              }
>
>
> thanks
> --amit
>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
Amit,

These changes have been recently made and are available in the latest 
gitorious repo of Qt, but currently not in any of the released versions.

Br,
Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110210/bc52bf13/attachment.html 


More information about the Qt-qml mailing list