QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ClickableColor.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Dialogs
4import Qt.labs.platform
5
6Rectangle {
7 id: _root
8 width: 80
9 height: 20
10 border.width: 1
11 border.color: "black"
12
13 signal colorSelected(var color)
14
15 ColorDialog {
16 id: colorDialog
17 onAccepted: {
18 _root.colorSelected(colorDialog.color)
19 colorDialog.close()
20 }
21 }
22
23 MouseArea {
24 anchors.fill: parent
25
26 onClicked: {
27 colorDialog.color = _root.color
28 colorDialog.visible = true
29 }
30 }
31}