add alert
This commit is contained in:
38
doric-Qt/doric/resources/alert.qml
Normal file
38
doric-Qt/doric/resources/alert.qml
Normal file
@@ -0,0 +1,38 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
Window {
|
||||
id: window
|
||||
|
||||
flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint
|
||||
visible: true
|
||||
modality: Qt.ApplicationModal
|
||||
|
||||
property var pointer
|
||||
property var plugin
|
||||
property var callbackId
|
||||
|
||||
Dialog {
|
||||
id: dialog
|
||||
title: "Title"
|
||||
standardButtons: Dialog.Ok
|
||||
modal: true
|
||||
|
||||
onAccepted: {
|
||||
dialogOnAcceptedBridge.onClick(pointer, plugin, callbackId)
|
||||
}
|
||||
|
||||
onWidthChanged: {
|
||||
window.width = implicitWidth
|
||||
}
|
||||
|
||||
onHeightChanged: {
|
||||
window.height = implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
dialog.open()
|
||||
dialog.standardButton(Dialog.Ok).text = qsTrId("OkLabel")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user