test_minimal.qml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import QtQuick 2.15
  2. import QtQuick.Controls 2.15
  3. import QtQuick.Window 2.15
  4. Window {
  5. visible: true
  6. width: 800
  7. height: 480
  8. title: "Qt Minimal Test"
  9. // Simple gradient background - no complex effects
  10. Rectangle {
  11. anchors.fill: parent
  12. gradient: Gradient {
  13. GradientStop { position: 0.0; color: "#2196F3" }
  14. GradientStop { position: 1.0; color: "#1976D2" }
  15. }
  16. Column {
  17. anchors.centerIn: parent
  18. spacing: 30
  19. // Title
  20. Text {
  21. text: "✅ Qt/QML Works!"
  22. font.pixelSize: 48
  23. font.bold: true
  24. color: "white"
  25. anchors.horizontalCenter: parent.horizontalCenter
  26. }
  27. // Info text
  28. Text {
  29. text: "Minimal test app - no effects, no images"
  30. font.pixelSize: 18
  31. color: "white"
  32. opacity: 0.9
  33. anchors.horizontalCenter: parent.horizontalCenter
  34. }
  35. // Simple button without effects
  36. Rectangle {
  37. width: 200
  38. height: 60
  39. radius: 8
  40. color: mouseArea.pressed ? "#FFC107" : "#FF9800"
  41. anchors.horizontalCenter: parent.horizontalCenter
  42. Text {
  43. text: "Test Button"
  44. anchors.centerIn: parent
  45. font.pixelSize: 20
  46. font.bold: true
  47. color: "white"
  48. }
  49. MouseArea {
  50. id: mouseArea
  51. anchors.fill: parent
  52. onClicked: {
  53. console.log("✅ Button clicked - touch/mouse works!")
  54. statusText.text = "Button clicked at " + new Date().toLocaleTimeString()
  55. }
  56. }
  57. }
  58. // Status text
  59. Text {
  60. id: statusText
  61. text: "Touch the button to test"
  62. font.pixelSize: 16
  63. color: "white"
  64. opacity: 0.8
  65. anchors.horizontalCenter: parent.horizontalCenter
  66. }
  67. }
  68. // Animation test - simple rotation
  69. Rectangle {
  70. width: 40
  71. height: 40
  72. radius: 20
  73. color: "#4CAF50"
  74. anchors.right: parent.right
  75. anchors.top: parent.top
  76. anchors.margins: 20
  77. RotationAnimation on rotation {
  78. from: 0
  79. to: 360
  80. duration: 2000
  81. loops: Animation.Infinite
  82. }
  83. Text {
  84. text: "↻"
  85. anchors.centerIn: parent
  86. font.pixelSize: 24
  87. color: "white"
  88. }
  89. }
  90. // FPS counter
  91. Text {
  92. text: "Qt " + Qt.application.version
  93. anchors.bottom: parent.bottom
  94. anchors.left: parent.left
  95. anchors.margins: 10
  96. font.pixelSize: 12
  97. color: "white"
  98. opacity: 0.6
  99. }
  100. }
  101. Component.onCompleted: {
  102. console.log("🎉 QML loaded successfully")
  103. console.log("📱 Window size:", width, "x", height)
  104. }
  105. }