Fix shortcuts when using setDefaultAction
Don't remove ampersands when setting the text: they will be removed when the text is displayed. This fixes double removal of ampersands. [ChangeLog][QtWidgets][QToolButton] Fix double removal of ampersands Task-number: QTBUG-23396 Change-Id: I56bf50eb24aae32a81d614824aca0b63363587c8 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>bb10
parent
2e5cfa1ad4
commit
4db5d3ccd1
|
|
@ -897,7 +897,7 @@ void QToolButton::setDefaultAction(QAction *action)
|
|||
return;
|
||||
if (!actions().contains(action))
|
||||
addAction(action);
|
||||
setText(action->iconText());
|
||||
setText(action->text());
|
||||
setIcon(action->icon());
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
setToolTip(action->toolTip());
|
||||
|
|
|
|||
Loading…
Reference in New Issue