tests/auto/declarative/qmlvisual/focusscope/test.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    17             height: 120
    17             height: 120
    18             width: 420
    18             width: 420
    19 
    19 
    20             color: "transparent"
    20             color: "transparent"
    21             border.width: 5
    21             border.width: 5
    22             border.color: myScope.wantsFocus?"blue":"black"
    22             border.color: myScope.activeFocus?"blue":"black"
    23 
    23 
    24             Rectangle {
    24             Rectangle {
    25                 id: item1
    25                 id: item1
    26                 x: 10; y: 10 
    26                 x: 10; y: 10 
    27                 width: 100; height: 100; color: "green"
    27                 width: 100; height: 100; color: "green"
    28                 border.width: 5
    28                 border.width: 5
    29                 border.color: wantsFocus?"blue":"black"
    29                 border.color: activeFocus?"blue":"black"
    30                 Keys.onDigit9Pressed: console.log("Top Left");
    30                 Keys.onDigit9Pressed: console.log("Top Left");
    31                 KeyNavigation.right: item2
    31                 KeyNavigation.right: item2
    32                 focus: true 
    32                 focus: true 
    33 
    33 
    34                 Rectangle {
    34                 Rectangle {
    40             Rectangle {
    40             Rectangle {
    41                 id: item2
    41                 id: item2
    42                 x: 310; y: 10
    42                 x: 310; y: 10
    43                 width: 100; height: 100; color: "green"
    43                 width: 100; height: 100; color: "green"
    44                 border.width: 5
    44                 border.width: 5
    45                 border.color: wantsFocus?"blue":"black"
    45                 border.color: activeFocus?"blue":"black"
    46                 KeyNavigation.left: item1
    46                 KeyNavigation.left: item1
    47                 Keys.onDigit9Pressed: console.log("Top Right");
    47                 Keys.onDigit9Pressed: console.log("Top Right");
    48 
    48 
    49                 Rectangle {
    49                 Rectangle {
    50                     width: 50; height: 50; anchors.centerIn: parent
    50                     width: 50; height: 50; anchors.centerIn: parent
    60     Rectangle {
    60     Rectangle {
    61         id: item3
    61         id: item3
    62         x: 10; y: 300
    62         x: 10; y: 300
    63         width: 100; height: 100; color: "green"
    63         width: 100; height: 100; color: "green"
    64         border.width: 5
    64         border.width: 5
    65         border.color: wantsFocus?"blue":"black"
    65         border.color: activeFocus?"blue":"black"
    66 
    66 
    67         Keys.onDigit9Pressed: console.log("Bottom Left");
    67         Keys.onDigit9Pressed: console.log("Bottom Left");
    68         KeyNavigation.up: myScope
    68         KeyNavigation.up: myScope
    69 
    69 
    70         Rectangle {
    70         Rectangle {