QColor color; if (native->isChecked()) color = QColorDialog::getColor(Qt::green, this); else color = QColorDialog::getColor(Qt::green, this, "Select Color", QColorDialog::DontUseNativeDialog);
if (color.isValid()) {
CTLabel->setText(color.name()); CTLabel->setPalette(QPalette(color)); CTLabel->setAutoFillBackground(true); }color.name(),显示出的只是16进制所表现出的数值,怎么用rgb表现出来啊,求大神指个明路,小弟在这里谢谢了!!