Hi,all.
I have designed some QPushbutton controls using QT designer ,and set background color of the push-buttons to some color. Just like:
TestColor.JPG, Now i only can get Qstring about background color by code:
QString str
=ui
->btn_curveColor
->styleSheet
();
cout<<str.toAscii().data()<<endl;
QString str=ui->btn_curveColor->styleSheet();
cout<<str.toAscii().data()<<endl;
To copy to clipboard, switch view to plain text mode
.
it gives me :
background-color: rgb(0, 0, 255);
background-color: rgb(0, 0, 255);
To copy to clipboard, switch view to plain text mode
is there a simple way to get background-color in QColor format? I don't want to convert the string to color.
best wishes.
Micky Jhon
Bookmarks