Hey..I used this,but whatever i give as input.. blue, white,yellow..it sets it as black itself..
Qt Code:
  1. void MainWindow::on_Set_clicked()
  2. {
  3. s=ui->bcolor->text();//textbox from wher i get input from user
  4. qApp->setStyleSheet("QLineEdit { background-color:s }");
  5.  
  6. }
To copy to clipboard, switch view to plain text mode