File: colorButtonTest.qml

package info (click to toggle)
kf6-kdeclarative 6.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 23,108 kB
  • sloc: cpp: 3,018; sh: 18; makefile: 7
file content (41 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (6)
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
/*
    SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson@kde.org>

    SPDX-License-Identifier: LGPL-2.0-or-later
*/

import QtQuick 2.1
import org.kde.kquickcontrols 2.0

Rectangle {
    width: 300
    height: 300
    color: "white"

    ColorButton {
        id: btn

        anchors.top: parent.top
        anchors.left: parent.left
        anchors.margins: 10

        dialogTitle: "I am title"
        showAlphaChannel: true

        color: "blue" //a default colour
    }


    Rectangle {
        anchors.top: parent.top
        anchors.left: btn.right
        anchors.margins: 10

        width: 20
        height: 20

        color: btn.color
    }


}