test_egl_info.py 576 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python3
  2. import sys
  3. import os
  4. # Set kiosk environment
  5. os.environ['QT_QPA_PLATFORM'] = 'eglfs'
  6. os.environ['QT_DEBUG_PLUGINS'] = '1'
  7. os.environ['QT_LOGGING_RULES'] = 'qt.qpa.*=true'
  8. from PySide6.QtGui import QGuiApplication
  9. app = QGuiApplication(sys.argv)
  10. print("✅ Qt app created successfully")
  11. print(f"Platform: {app.platformName()}")
  12. # Try to get screen info
  13. screens = app.screens()
  14. print(f"Number of screens: {len(screens)}")
  15. for i, screen in enumerate(screens):
  16. print(f"Screen {i}: {screen.size().width()}x{screen.size().height()}")
  17. sys.exit(0)