I'm trying to create a QMessageBox in form class but when I run the program,the background of message box is the same with the form class so the setStyleSheet function is not working. Here is the sample of my code :
QMessageBox msg(this);
msg.about(this,"hata","deneme");
msg.setStyleSheet(QString::fromUtf8("background-color: rgb(241, 241, 241);"));
msg.setWindowTitle("Hata");
msg.show();
Any help much appreciated.