hi friends,
i am using QMessageBox to dispaly warning if the user press a pushButton ..
i coded like this:
Qt Code:
  1. QMessageBox msgBox;
  2.  
  3. int ret = QMessageBox::warning(this, tr("My Application"),
  4. tr("<font color = red >Are you sure you want to quit?.\n"
  5. "Shut Down key is pressed </font >"),
  6. QMessageBox::Ok | QMessageBox::Cancel);
  7.  
  8. msgBox.setStyleSheet(QString::fromUtf8("background-color: rgb(241, 241, 241);"));
  9. switch (ret) {
  10. case QMessageBox::Ok :
  11. qApp->quit();
  12. break;
  13.  
  14. case QMessageBox::Cancel :
  15. break;
  16.  
  17. default :
  18. break;
  19.  
  20. }
To copy to clipboard, switch view to plain text mode 
rendered using the default stylesheet of app .. it is pure black in background color ..
the text are not visible ... so i use <font > in constructor of QMessage::warning ..

but i cant set font color of buttons ... yes , no text were not visible ...

i try change the background color of QMessageBox .. but QPalette and StyleSheet is not working ... please help ...
how to set backgroud color or color of the text in QMessage::standardButton()