This is resolved now. I have changed the popup code to
FocusScope{ anchors.fill:parent visible:false property variant caller x:300 y:100 Image{ source:"popup.png" BaseButton { id:buttonOk buttonText:"Ok" KeyNavigation.right:buttonCancel focus:true x:0 onButtonClicked:{popup.visible=false;caller.forceActiveFocus()} } BaseButton { id: buttonCancel x:400 KeyNavigation.left:buttonOk; buttonText:"Cancel" } } } So whenever popup is invoked, I set the caller to the item or group Warm Regards ~~~~~~~~~~~~~~~ Vinayak http://www.flickr.com/photos/rightplacerighttime/ On Thu, Feb 10, 2011 at 6:03 PM, Vinayakam Murugan <mvinaya...@gmail.com>wrote: > Hello > > > I have a popup QML which could be invoked from any screen > > Popup.QML > > FocusScope{ > > anchors.fill:parent > > visible:false > > x:300 > > y:100 > > Image{ > > source:"popup.png" > > BaseButton { > > id:buttonOk > > buttonText:"Ok" > > KeyNavigation.right:buttonCancel > > x:0 > > onButtonClicked:{popup.visible=false;} > > } > > BaseButton { > > id: buttonCancel > > x:400 > > focus:true > > KeyNavigation.left:buttonOk; > > buttonText:"Cancel" > > } > > } > > } > > > > The problem I am facing is that once I click on Ok here and hide the popup, > the keyboard focus is lost. Is there a way I can have the focus on the > screen which invoked it. > > > Warm Regards > ~~~~~~~~~~~~~~~ > Vinayak > > http://www.flickr.com/photos/rightplacerighttime/ >
_______________________________________________ Qt-qml mailing list Qt-qml@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-qml