summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/simpleqml/main.qml
blob: 92a23c8f086324c97d723b1916ddb88b8ccf0999 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick 2.5
import QtQuick.Controls 2.0

import app 1.0

Rectangle {
    // Properties from context
    property Controller controller: context

    color: controller.color

    Label {
        id: idText
        text: "Color slider"
        anchors.top: parent.top
        anchors.left: parent.left
        color: "black"
        font.pixelSize: 12
    }

    Slider {
        value: controller.value
        onVisualPositionChanged: controller.value = visualPosition

        anchors.top: idText.bottom
        anchors.left: parent.left
    }
}