summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/QtUtils/NonAutodismissibleMenu.h
blob: cb18cc6be888dd5f7a410d42149e1aff7f1a149a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2025 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QMenu>

namespace QtUtils
{

// A menu widget based on QMenu that will not be automatically dismissed when one of its checkable
// actions are triggered.
class NonAutodismissibleMenu : public QMenu
{
public:
  using QMenu::QMenu;

protected:
  void mouseReleaseEvent(QMouseEvent* event) override;
};

}  // namespace QtUtils