Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PySide import QtCore, QtGui
- from QtMobility.SystemInfo import QSystemDisplayInfo
- QtGui.QApplication([])
- def orient(screen):
- o = QSystemDisplayInfo().orientation(screen)
- if o == QSystemDisplayInfo.Landscape:
- print 'landscape'
- elif o == QSystemDisplayInfo.Portrait:
- print 'portrait'
- else:
- print 'unknown'
- orient(0)
- orient(-1)
- orient(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement