QMessageBox: Opt out of native dialog if standard buttons have menu
Amends 2d59f2e8caed71d4eceb1abe3ce17b7befb40559, which only checked this for custom buttons, but standard buttons can also be customized. Pick-to: 6.5 Change-Id: Ie8bafcf5007a0b4789b2d0ee1ddbc660a952fee4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 7fb0c2bbf9af7956e6b8a0b1906792437aa40517) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
7dc27689c7
commit
5c614efcab
@ -2818,7 +2818,7 @@ bool QMessageBoxPrivate::canBeNativeDialog() const
|
||||
if (strcmp(QMessageBox::staticMetaObject.className(), q->metaObject()->className()) != 0)
|
||||
return false;
|
||||
|
||||
for (auto *customButton : customButtonList) {
|
||||
for (auto *customButton : buttonBox->buttons()) {
|
||||
if (QPushButton *pushButton = qobject_cast<QPushButton *>(customButton)) {
|
||||
// We can't support buttons with menus in native dialogs (yet)
|
||||
if (pushButton->menu())
|
||||
|
Loading…
x
Reference in New Issue
Block a user