Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.0, 6.5.2
-
None
Description
When creating a message box and setting the text of its standard buttons the displayed native buttons still show the default text.
#include <QApplication> #include <QMessageBox> #include <QPushButton> int main(int argc, char *argv[]) { QApplication a(argc, argv); QPushButton btn; btn.setText("Show msg box"); btn.show(); QObject::connect(&btn, &QPushButton::clicked, []{ QMessageBox box; box.setStandardButtons(QMessageBox::Yes); box.button(QMessageBox::Yes)->setText("Hello World!"); box.exec(); }); return a.exec(); }