highlighting custom QWidgetAction on hover
问题 My application has a QMenuBar with a number of QMenu s, each of which having a number of QAction s and sub- QMenu s. Most of the QAction -items are derivatives of QWidgetAction with re-implemented QWidgetAction::createWidget methods. Usually, both QAction s and QMenu become highlighted on mouse hover. Even a QWidgetAction doesn't make trouble until here: But as soon as I override QWidgetAction::createWidget to return a custom QWidget QWidget* MyWidgetAction::createWidget(QWidget* parent) {