mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 02:27:09 +02:00
23 lines
485 B
QML
23 lines
485 B
QML
import QtQuick 2.5
|
|
|
|
import "../../qml/dialogs"
|
|
|
|
QtObject {
|
|
id: root
|
|
signal accepted;
|
|
property var text;
|
|
|
|
property var messageDialogBuilder: Component { MessageDialog { } }
|
|
|
|
function open() {
|
|
console.log("prompt text " + text)
|
|
var dialog = messageDialogBuilder.createObject(desktop, {
|
|
text: root.text
|
|
});
|
|
|
|
dialog.selected.connect(function(button){
|
|
accepted();
|
|
dialog.destroy();
|
|
});
|
|
}
|
|
}
|