aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/qquickapplicationwindow/data/activefocusontab.qml
blob: dd53faf537673c5f9b6b3d31b1f27460ba965e9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick
import QtQuick.Controls

ApplicationWindow {
    title: "Test Application Window"
    width: 100
    height: 100
    Item {
        id: main
        objectName: "main"
        width: 100
        height: 100
        //focus: true
        Column {
            anchors.fill: parent
            id: column
            objectName: "column"
            Item {
                id: sub1
                objectName: "sub1"
                activeFocusOnTab: true
                Accessible.role: Accessible.Table
                width: 100
                height: 50
                Rectangle {
                    anchors.fill: parent
                    color: parent.activeFocus ? "red" : "black"
                }
            }
            Item {
                id: sub2
                objectName: "sub2"
                activeFocusOnTab: true
                Accessible.role: Accessible.Table
                width: 100
                height: 50
                Rectangle {
                    anchors.fill: parent
                    color: parent.activeFocus ? "red" : "black"
                }
            }
        }
    }
}