Guest User

Untitled

a guest
Jan 17th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. import sys
  2. from PySide.QtCore import *
  3. from PySide.QtGui import *
  4.  
  5. app = QApplication(sys.argv)
  6. w = QWidget()
  7. w.setBackgroundRole(QPalette.Base)
  8. w.show()
  9. app.exec_()
  10.  
  11. p = w.palette()
  12. p.setColor(w.backgroundRole(), Qt.red)
  13. w.setPalette(p)
Add Comment
Please, Sign In to add comment