Hi guys,

I've got a problem applying a stylesheet to a Menu Button. I expect the following code to apply a blue background to all widgets, including the Button for the menu. But it doesn't. Is it a bug or am I doing something wrong?

Cheers,

Jan

################################################################
import PyQt4.QtGui as QtGui

class MyMainWindow(QtGui.QMainWindow):

    def __init__(self, parent=None):
        super(MyMainWindow, self).__init__(parent)
        self.menu_bar = self.menuBar()
        self.session_menu = self.menu_bar.addMenu("&Session")

        self.setStyleSheet("""
        *
        {
            background-color: blue;
        }
        """)

if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    main_window = MyMainWindow()
    main_window.show()
    app.exec_()
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to