FluentUI/example/qml-Qt6/window/CrashWindow.qml

78 lines
1.7 KiB
QML
Raw Normal View History

2024-01-04 18:00:44 +08:00
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import FluentUI
import Qt.labs.platform
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
showStayTop: false
2024-02-27 16:56:55 +08:00
stayTop:true
2024-01-04 18:00:44 +08:00
property string crashFilePath
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)
}
}
}
}