QMenu: ensure that a menu item's icon can be removed dynamically
Task-number: QTBUG-41348 Change-Id: Iad3b7f000ebce51530f5e196868aefffad2e1eab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
74a20b77a6
commit
0647f24c7d
@ -2980,6 +2980,8 @@ static void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem* i
|
||||
QStyleOption opt;
|
||||
item->setIconSize(qApp->style()->pixelMetric(QStyle::PM_SmallIconSize, &opt, 0));
|
||||
}
|
||||
} else {
|
||||
item->setIcon(QIcon());
|
||||
}
|
||||
item->setVisible(action->isVisible());
|
||||
item->setShortcut(action->shortcut());
|
||||
|
Loading…
Reference in New Issue
Block a user