2021-03-05 00:35:15 +01:00
|
|
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2017-05-31 16:06:03 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QMenu>
|
|
|
|
|
2017-07-15 16:11:46 +02:00
|
|
|
#include "Config.h"
|
|
|
|
|
2017-05-31 16:06:03 +02:00
|
|
|
class Menu : public QMenu
|
|
|
|
{
|
2018-09-08 13:55:30 +02:00
|
|
|
Q_OBJECT
|
2017-05-31 16:06:03 +02:00
|
|
|
public:
|
2017-09-10 11:59:21 +02:00
|
|
|
Menu(QWidget *parent = nullptr)
|
2018-09-08 13:55:30 +02:00
|
|
|
: QMenu(parent){};
|
2017-05-31 16:06:03 +02:00
|
|
|
|
|
|
|
protected:
|
2018-09-08 13:55:30 +02:00
|
|
|
void leaveEvent(QEvent *e) override
|
2017-09-10 11:59:21 +02:00
|
|
|
{
|
|
|
|
hide();
|
2018-09-08 13:55:30 +02:00
|
|
|
|
|
|
|
QMenu::leaveEvent(e);
|
2017-09-10 11:59:21 +02:00
|
|
|
}
|
2017-05-31 16:06:03 +02:00
|
|
|
};
|