[Solved]#123456 to corresponding text
-
Hi guys,
in QcolorComboBox, if I get the RGB number, how can I get the correspongind text?
thanks. -
Fixed!
@
QString name = curveParms->curveColor().name();
QStringList colorNames = QColor::colorNames();for (int i = 0; i < colorNames.count(); ++i) { QString cn = colorNames[i]; QColor color(cn); if(color.name().compare(name) == 0) { name = cn; } } v = QVariant(name);
@