QDialogButtonBox: fix crash when adding a QToolButton
Introduced by commit d4f38a3632
Pick-to: 6.7 6.6 6.5
Change-Id: I99385249a454c75eeae13c1d17670b356427cb70
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
bb10
parent
9bf68a47e1
commit
d9b63c90bf
|
|
@ -294,7 +294,7 @@ void QDialogButtonBoxPrivate::layoutButtons()
|
|||
for (QWidget *here : layoutWidgets) {
|
||||
QWidget::setTabOrder(prev, here);
|
||||
prev = here;
|
||||
if (auto *pushButton = qobject_cast<QPushButton *>(prev); pushButton->isDefault())
|
||||
if (auto *pushButton = qobject_cast<QPushButton *>(prev); pushButton && pushButton->isDefault())
|
||||
q->setFocusProxy(pushButton);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue