[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] StyleSheet for Menu Button
From: Knacktus <knacktus () googlemail ! com>
Date: 2011-04-22 5:22:24
Message-ID: 4DB11090.4030503 () googlemail ! com
[Download RAW message or body]
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 PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic