//To use color on text and label //Simple sample :) QColor color = QColorDialog::getColor(QColor(ui->backgroundColorPickerText->text()), this); if(color.isValid()) { QPixmap pix(21, 21); pix.fill(color); ui->backgroundColorPickerLabel->setPixmap(pix); ui->backgroundColorPickerText->setText(color.name()); }