mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
38 lines
812 B
QML
38 lines
812 B
QML
import QtQuick 2.15
|
|
|
|
Item {
|
|
id: dialogs
|
|
objectName: "dialogs"
|
|
anchors.fill: parent
|
|
|
|
Loader {
|
|
id: loader
|
|
anchors.centerIn: parent
|
|
}
|
|
|
|
function message(text) {
|
|
if ((Qt.platform.os === "android") ||
|
|
(Qt.platform.os === "ios")) {
|
|
loader.source = "MessageMobile.qml"
|
|
} else {
|
|
loader.source = "Message.qml"
|
|
}
|
|
loader.item.text = text
|
|
main.showKeyboard(false)
|
|
loader.item.open()
|
|
}
|
|
|
|
function confirm(title, text, callback) {
|
|
if ((Qt.platform.os === "android") ||
|
|
(Qt.platform.os === "ios")) {
|
|
loader.source = "ConfirmMobile.qml"
|
|
} else {
|
|
loader.source = "Confirm.qml"
|
|
}
|
|
loader.item.title = title
|
|
loader.item.text = text
|
|
loader.item.callback = callback
|
|
main.showKeyboard(false)
|
|
loader.item.open()
|
|
}
|
|
}
|