SplashScreen.qml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import QtQuick 2.0
  2. import QtQuick.Controls 2.0
  3. import QtQuick.Window 2.2
  4. import QtQuick.Controls.Universal 2.12
  5. /*
  6. 启动屏幕的界面部件,系统加载界面
  7. */
  8. Window {
  9. id: splashScreen
  10. modality: Qt.ApplicationModal
  11. flags: Qt.SplashScreen
  12. width: 500
  13. height: 500
  14. x: 710
  15. y: 290
  16. FontLoader {
  17. id: alibaba
  18. source: "qrc:/components/font/Alibaba-PuHuiTi-Bold.ttf"
  19. }
  20. Rectangle {
  21. id: splashRect
  22. anchors.fill: parent
  23. border.width: 1
  24. border.color: "black"
  25. color: 'transparent'
  26. Image {
  27. fillMode: Image.PreserveAspectFit
  28. source: 'qrc:/images/bg1.png'
  29. }
  30. Text {
  31. anchors.horizontalCenter: parent.horizontalCenter
  32. anchors.top: parent.top
  33. anchors.topMargin: 150
  34. // width: 500
  35. // height: 500
  36. // horizontalAlignment: Text.AlignHCenter
  37. // verticalAlignment: Text.AlignVCenter
  38. text: textTitle
  39. font.pointSize: 24
  40. font.bold: true
  41. color: mainTextColor
  42. font.family: alibaba.name
  43. }
  44. BusyIndicator {
  45. id: busyAnimation
  46. anchors.horizontalCenter: parent.horizontalCenter
  47. anchors.bottom: parent.bottom
  48. anchors.bottomMargin: parent.height / 8
  49. width: parent.width / 6
  50. height: width
  51. running: true
  52. Universal.accent: Universal.Cyan
  53. }
  54. }
  55. Component.onCompleted: visible = true
  56. }