Remove icon space from QMenu
问题 I'm working on a Qt application (in C++). Without appyling any styles, my menu looks like this: I'd like it to look like this: How do I achieve this? Either using qss, or programmatically? I already tried this, without success: menu->addAction(tr("Add"), this, SLOT(CreateNewWaypoint()))->setIconVisibleInMenu(false); Answers for both Qt4.8 and Qt5 are needed to get the full bounty! 回答1: One way to solve the problem is to use QProxyStyle: customstyle.h #ifndef CUSTOMSTYLE_H #define CUSTOMSTYLE