Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0
-
None
-
-
e9a1c5321 (dev), eb5f18375 (6.6)
Description
Native feeling macOS QMessageBox does not support title and changing button texts using msgbox->button(id)->setText(text).
Resulting message box contains always default English button texts, even on non-English macOS (I have correct .lproj subfolders, so for example native Open/Save file dialogs in Qt have localised buttons). BTW, messagebox title and icon are not shown either.
Suggestion: in case it is not possible to change the button texts in native QMessageBox on macOS, please use the old-style QMessageBox style.
QMessageBox aMsgBox(QMessageBox::Information, "Title", "Some message", QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this);
aMsgBox.button(QMessageBox::Yes)->setText("Positive");
aMsgBox.button(QMessageBox::No)->setText("Negative");
aMsgBox.exec();
Attachments
For Gerrit Dashboard: QTBUG-112525 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
501233,2 | Add note to QMessageBox::button() about modifying returned button | dev | qt/qtbase | Status: MERGED | +2 | 0 |
502837,2 | Add note to QMessageBox::button() about modifying returned button | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |