Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hellow, how can i get rgb name from QColor For example I have QColor = Qt::black how can i get "rgb(0,0,0)" I try it: @c.toRgb().name()@ But it is get me #000000 instead of rgb(0,0,0); Advance many thanks for your help
if you need rgb(0,0,0), you can do:
@ QColor c = Qt::black; QString text = QString("rgb(%1,%2,%3)").arg(c.red()).arg(c.green()).arg(c.blue()); @
Code is not tested, just written here
Try this: @ QColor c; // QString name = QString("rgb(%1,%2,%3)").arg(c.red()).arg(c.green()).arg(c.blue()); @ *EDIT:*As Gerolf said... >:(