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:
Qt Code:
  1. QString str=ui->btn_curveColor->styleSheet();
  2. cout<<str.toAscii().data()<<endl;
To copy to clipboard, switch view to plain text mode 
.
it gives me :

Qt Code:
  1. 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