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:
Shawn Rutledge 2014-10-09 14:10:04 +02:00
parent 74a20b77a6
commit 0647f24c7d

View File

@ -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());