#ifndef CUSTOMMENU_H #define CUSTOMMENU_H #include class CustomMenu : public QMenu { Q_OBJECT public: CustomMenu(QWidget *parent = nullptr); virtual ~CustomMenu(); bool mouseIsInside() {return m_bMouseInside;} protected: void enterEvent(QEnterEvent*); void leaveEvent(QEvent*); //void focusInEvent(QFocusEvent*); private: bool m_bMouseInside; }; #endif