Originally Posted by
QbelcorT
hi
Here is my example I used on a QCalendar for the QMenu in it.
QMenu { font
-size
:18px; width
: 150px; color
:white; left
: 20px; background
-color
:qlineargradient
(x1
:0, y1
:0, x2
:0, y2
:1, stop
: 0 #cccccc, stop: 1 #333333);}
QMenu { font-size:18px; width: 150px; color:white; left: 20px; background-color:qlineargradient(x1:0, y1:0, x2:0, y2:1, stop: 0 #cccccc, stop: 1 #333333);}
To copy to clipboard, switch view to plain text mode
Thanks for the example. But when I use it like this:
myMenu.setStyleSheet("{ font-size:18px; width: 150px; color:white; left: 20px; background-color:qlineargradient(x1:0, y1:0, x2:0, y2:1, stop: 0 #cccccc, stop: 1 #333333);}");
myMenu.setStyleSheet("{ font-size:18px; width: 150px; color:white; left: 20px; background-color:qlineargradient(x1:0, y1:0, x2:0, y2:1, stop: 0 #cccccc, stop: 1 #333333);}");
To copy to clipboard, switch view to plain text mode
I get "Could not parse stylesheet of widget" so it looks as if I am missing something fundamental.
Bookmarks