summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml
blob: a562b8b0eae182efdb7049eaf9560be808bf757f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Qt 4.7

QGraphicsWidget {
    size: "200x100"
    focusPolicy: QGraphicsWidget.ClickFocus
    Item {
        objectName: "declarativeItem"
        id: item
        width: 200
        height: 100
        MouseArea {
            anchors.fill: parent
            onPressed: {
                if (!item.focus) {
                    item.focus = true;
                }
            }
        }
    }
}