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 Layout.minimumWidth: implicitWidth
24 }
25
26 QGCComboBox {
27 id: _comboBox
28 Layout.preferredWidth: comboBoxPreferredWidth
29 sizeToContents: true
30 onActivated: (index) => { parent.activated(index) }
31 }
32}