I had a working program in Qt4. After porting it to Qt5, the QActions' icons no longer show in the QMenu; only the text shows. The icons show ok in the toolbar, but not in the menu. I've already set the app to disable "AA_DontShowIconsInMenus" to no avail. Here is a portion of the code:
pMenuBar = new QMenuBar(this);
pMenuBar->setObjectName(QString::fromUtf8("Menu Bar"));
pMenuBar->setGeometry(QRect(0, 0, 800, 27));
MyIcon.addFile(":/images/filenew.ico", QSize(), QIcon::Normal, QIcon::On);
pAction = new QAction(tr("&New"), this);
pAction->setIcon(MyIcon);
pAction->setIconVisibleInMenu(true);
pAction->setShortcuts(QKeySequence::New);
pAction->setStatusTip(tr("New"));
pMenuFile = new QMenu(pMenuBar);
pMenuFile->setObjectName(QString::fromUtf8("File Menu"));
// pMenuFile->menuAction()->setIconVisibleInMenu(true);
pMenuFile->addAction(pAction);
pMenuBar->addAction(pMenuFile->menuAction());
setMenuBar(pMenuBar);