Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class QCustomMenu : public QMenu
  2. {
  3. Q_OBJECT
  4. public:
  5. QCustomMenu(QObject *parent = 0);
  6. void showEvent(QShowEvent *);
  7. };
  8.  
  9. QCustomMenu::QCustomMenu(QObject *parent)
  10. {
  11.  
  12. }
  13.  
  14. void QCustomMenu::showEvent(QShowEvent *ev)
  15. {
  16. this->hide(); // close() also possible
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement