Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qaction_widgets_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QACTION_WIDGETS_P_H
5#define QACTION_WIDGETS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qaction_p.h>
19#if QT_CONFIG(menu)
20#include <QtWidgets/qmenu.h>
21#endif
22
24
26
27class QShortcutMap;
28
29class Q_WIDGETS_EXPORT QtWidgetsActionPrivate : public QActionPrivate
30{
31 Q_DECLARE_PUBLIC(QAction)
32public:
35
36 void destroy() override;
37
38#if QT_CONFIG(shortcut)
39 QShortcutMap::ContextMatcher contextMatcher() const override;
40#endif
41
42#if QT_CONFIG(menu)
43 QPointer<QMenu> m_menu;
44
45 QObject *menu() const override;
46 void setMenu(QObject *menu) override;
47#endif
48};
49
51
52#endif // QACTION_WIDGETS_P_H
virtual void setMenu(QObject *menu)
Definition qaction.cpp:130
virtual QObject * menu() const
Definition qaction.cpp:134
virtual void destroy()
Definition qaction.cpp:67
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore
Definition qpointer.h:18
bool(* ContextMatcher)(QObject *object, Qt::ShortcutContext context)
QtWidgetsActionPrivate()=default
Combined button and popup list for selecting options.
#define QT_REQUIRE_CONFIG(feature)
QMenu menu
[5]