aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/qquickpopup/data/countChanged.qml
blob: e95be76e56cae3393f8d7dd0ef7bdb733b580d21 (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
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick.Window
import QtQuick.Controls

Window {
    width: 640
    height: 480
    property bool isModel1: true
    property alias comboBox: comboBox
    property int count: comboBox.count
    ListModel {
        id: model1
        ListElement {
            display: "one"
        }
    }
    ListModel {
        id: model2
        ListElement {
            display: "one"
        }
        ListElement {
            display: "two"
        }
    }
    ComboBox {
        id: comboBox
        model: isModel1 ? model1 : model2
    }
}