Unsolved KeyNavigation will nicht ....
-
Hallo
ich versuche gerade die Pfeiltasten zur Steuerrung vom Focus zu verwenden. Ich kann zwar den Fokus durch anklicken auf ein Rectangle setzen, nicht aber durch verwenden der Pfeiltasten.Was mache ich falsch?
Item { id:theUe10Content width: 400; height: 200 Rectangle { id: lightblue_square width: 50; height: 50 color: (focus ==true)? "red" : "lightblue" anchors { left:parent.left top:parent.top leftMargin:35 topMargin:35 } MouseArea { anchors.fill:parent onClicked: parent.focus = true } KeyNavigation.right: green_square } Rectangle { id: green_square width: 50; height: 50 color:focus? "red":"green" anchors { right:parent.right top:parent.top rightMargin:35 topMargin:35 } MouseArea { anchors.fill:parent onClicked: parent.focus = true } KeyNavigation.left:lightblue_square } }