QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCSimpleMessageDialog.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7QGCPopupDialog {
8 property alias text: label.text
9 property var acceptFunction: null // Mainly used by MainRootWindow.showMessage to specify accept function in call
10 property var closeFunction: null
11
12 onAccepted: {
13 if (acceptFunction) {
14 acceptFunction()
15 }
16 }
17
18 onClosed: {
19 if (closeFunction) {
20 closeFunction()
21 }
22 }
23
24 ColumnLayout {
25 QGCLabel {
26 id: label
27 Layout.preferredWidth: Math.max(mainWindow.width / (ScreenTools.isMobile ? 2 : 3), headerMinWidth)
28 wrapMode: Text.WordWrap
29 }
30 }
31}