FluentUI/example/qml/window/CrashWindow.qml

80 lines
1.7 KiB
QML
Raw Normal View History

2024-01-04 18:00:44 +08:00
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import FluentUI 1.0
import Qt.labs.platform 1.0
2024-01-25 17:26:50 +08:00
import "../component"
2024-01-04 18:00:44 +08:00
FluWindow {
id:window
2024-03-09 15:35:48 +08:00
title: qsTr("Friendly Reminder")
2024-01-04 18:00:44 +08:00
width: 300
height: 400
fixSize: true
showMinimize: false
property string crashFilePath
2024-03-11 22:55:07 +08:00
Component.onCompleted: {
window.stayTop = true
}
2024-01-04 18:00:44 +08:00
onInitArgument:
(argument)=>{
crashFilePath = argument.crashFilePath
}
Image{
width: 540/2
height: 285/2
anchors{
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 40
}
source: "qrc:/example/res/image/ic_crash.png"
}
FluText{
id:text_info
anchors{
top: parent.top
topMargin: 240
2024-03-09 15:35:48 +08:00
left: parent.left
right: parent.right
leftMargin: 10
rightMargin: 10
2024-01-04 18:00:44 +08:00
}
2024-03-09 22:19:10 +08:00
wrapMode: Text.WrapAnywhere
2024-03-09 15:35:48 +08:00
text: qsTr("We apologize for the inconvenience caused by an unexpected error")
2024-01-04 18:00:44 +08:00
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
RowLayout{
anchors{
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: 20
}
FluButton{
2024-03-09 15:35:48 +08:00
text: qsTr("Report Logs")
2024-01-04 18:00:44 +08:00
onClicked: {
FluTools.showFileInFolder(crashFilePath)
}
}
Item{
width: 30
height: 1
}
FluFilledButton{
2024-03-09 15:35:48 +08:00
text: qsTr("Restart Program")
2024-01-04 18:00:44 +08:00
onClicked: {
FluApp.exit(931)
}
}
}
}