matrixion/src/ui/Menu.h

22 lines
317 B
C
Raw Normal View History

2017-05-31 17:06:03 +03:00
#pragma once
#include <QMenu>
#include "Config.h"
2017-05-31 17:06:03 +03:00
class Menu : public QMenu
{
2018-09-08 14:55:30 +03:00
Q_OBJECT
2017-05-31 17:06:03 +03:00
public:
2017-09-10 12:59:21 +03:00
Menu(QWidget *parent = nullptr)
2018-09-08 14:55:30 +03:00
: QMenu(parent){};
2017-05-31 17:06:03 +03:00
protected:
2018-09-08 14:55:30 +03:00
void leaveEvent(QEvent *e) override
2017-09-10 12:59:21 +03:00
{
hide();
2018-09-08 14:55:30 +03:00
QMenu::leaveEvent(e);
2017-09-10 12:59:21 +03:00
}
2017-05-31 17:06:03 +03:00
};