I have a question about how to use QColor with style sheets.
Normally I would color my text by doing:
Label->setStyleSheet( "color: rgb(100,200,200);" );
QLabel Label;
Label->setStyleSheet( "color: rgb(100,200,200);" );
To copy to clipboard, switch view to plain text mode
Now I'd like to specify the rgb color in QColor format (as shown below) but that won't work:
mycolor
= QColor(100,
200,
200);
x1Label->setStyleSheet( "color: mycolor;" );
QLabel Label;
mycolor = QColor(100,200,200);
x1Label->setStyleSheet( "color: mycolor;" );
To copy to clipboard, switch view to plain text mode
I think I can not put QColor directly into the stylesheet.
So I also tried color: mycolor.toRgb(); but still didn't get it to work
Bookmarks