WaitPromptBox.qml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import QtQuick 2.15
  2. import QtQuick.Controls 2.15
  3. Window {
  4. id: waitpromptbox
  5. visibility: Window.FullScreen;
  6. flags: Qt.Dialog | Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint
  7. modality: Qt.ApplicationModal
  8. color: "transparent"
  9. Rectangle {
  10. anchors.centerIn: parent
  11. width: 360
  12. height: 360
  13. color: "#980e57ea"
  14. radius: 16
  15. BusyIndicator {
  16. anchors.top: parent.top
  17. anchors.topMargin: 32
  18. anchors.horizontalCenter: parent.horizontalCenter
  19. width: 200
  20. height: 200
  21. running: loadingBox.visible
  22. }
  23. Text {
  24. anchors.bottom: parent.bottom
  25. anchors.bottomMargin: 32
  26. anchors.horizontalCenter: parent.horizontalCenter
  27. text: "请等待..."
  28. color: "#ffffff"
  29. font.pixelSize: 32
  30. font.bold: true
  31. }
  32. }
  33. function show()
  34. {
  35. visible = true;
  36. }
  37. function hide()
  38. {
  39. visible = false;
  40. }
  41. }