QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
LabelledComboBox.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7RowLayout {
8 property alias label: label.text
9 property alias model: _comboBox.model
10 property alias currentIndex: _comboBox.currentIndex
11 property alias currentText: _comboBox.currentText
12 property alias alternateText: _comboBox.alternateText
13 property var comboBox: _comboBox
14 property real comboBoxPreferredWidth: -1
15
16 spacing: ScreenTools.defaultFontPixelWidth
17
18 signal activated(int index)
19
20 QGCLabel {
21 id: label
22 Layout.fillWidth: true
23 }
24
25 QGCComboBox {
26 id: _comboBox
27 Layout.preferredWidth: comboBoxPreferredWidth
28 sizeToContents: true
29 onActivated: (index) => { parent.activated(index) }
30 }
31}