The QMainWindow
below is assigned a dark-gray background-color using QSS.
I would also like to change the color of the borders and the color of the title bar.
How to achieve control of the appearance of the QMainWindow
borders and titlebar?
I would like to know how to change their colors and how to control the borders width and the title-bar's height.
from PyQt4.QtCore import *
from PyQt4.QtGui import *
appStyle="""
QMainWindow{
background-color: darkgray;
}
"""
class GUI(QMainWindow):
def __init__(self):
super(GUI, self).__init__()
self.setStyleSheet(appStyle)
if __name__ == '__main__':
if not QApplication.instance(): app=QApplication([])
w=GUI()
w.setStyleSheet(appStyle)
w.show()
w.raise_()
sys.exit(app.exec_())