Advertisement
Guest User

Untitled

a guest
Nov 6th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from PySide import QtCore, QtGui
  2. from QtMobility.SystemInfo import QSystemDisplayInfo
  3. QtGui.QApplication([])
  4.  
  5. def orient(screen):
  6. o = QSystemDisplayInfo().orientation(screen)
  7. if o == QSystemDisplayInfo.Landscape:
  8. print 'landscape'
  9. elif o == QSystemDisplayInfo.Portrait:
  10. print 'portrait'
  11. else:
  12. print 'unknown'
  13.  
  14. orient(0)
  15. orient(-1)
  16. orient(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement