SplashScreen.qml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. Window {
  6. id: splashScreen
  7. modality: Qt.ApplicationModal
  8. flags: Qt.SplashScreen
  9. width: 500
  10. height: 500
  11. x: 710
  12. y: 290
  13. FontLoader {
  14. id: alibaba
  15. source: "qrc:/components/font/Alibaba-PuHuiTi-Bold.ttf"
  16. }
  17. Rectangle {
  18. id: splashRect
  19. anchors.fill: parent
  20. border.width: 1
  21. border.color: "black"
  22. color: 'transparent'
  23. Image {
  24. fillMode: Image.PreserveAspectFit
  25. source: 'qrc:/images/bg.png'
  26. }
  27. Text {
  28. anchors.horizontalCenter: parent.horizontalCenter
  29. anchors.top: parent.top
  30. anchors.topMargin: 150
  31. // width: 500
  32. // height: 500
  33. // horizontalAlignment: Text.AlignHCenter
  34. // verticalAlignment: Text.AlignVCenter
  35. text: textTitle
  36. font.pointSize: 24
  37. font.bold: true
  38. color: mainTextColor
  39. font.family: alibaba.name
  40. }
  41. BusyIndicator {
  42. id: busyAnimation
  43. anchors.horizontalCenter: parent.horizontalCenter
  44. anchors.bottom: parent.bottom
  45. anchors.bottomMargin: parent.height / 8
  46. width: parent.width / 6
  47. height: width
  48. running: true
  49. Universal.accent: Universal.Cyan
  50. }
  51. }
  52. Component.onCompleted: visible = true
  53. }