2017-05-31 17:06:03 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QMenu>
|
|
|
|
|
2017-07-15 17:11:46 +03:00
|
|
|
#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
|
|
|
};
|