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
4
5Rectangle {
6 id: _root
7 width: 80
8 height: 20
9 border.width: 1
10 border.color: "black"
11
12 signal colorSelected(var color)
13
14 ColorDialog {
15 id: colorDialog
16 onAccepted: {
17 _root.colorSelected(colorDialog.selectedColor)
18 colorDialog.close()
19 }
20 }
21
22 MouseArea {
23 anchors.fill: parent
24
25 onClicked: {
26 colorDialog.selectedColor = _root.color
27 colorDialog.open()
28 }
29 }
30}