python - How to change the background color in PyQt4 -
i new pyqt4(just learned 2 days ago) , know question has easy answer can't find anywhere. trying change background color of window black. have code far.
import sys pyqt4 import qtgui class display(qtgui.qmainwindow): def __init__(self): super(display, self).__init__() self.showfullscreen() self.show() if name == '__main__': app = qtgui.qapplication(sys.argv) gui = display() sys.exit(app.exec())
when run white window. there method run change black?
you can set stylesheet
window.
self.showfullscreen() self.setstylesheet("background-color: black;")
Comments
Post a Comment