Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwidgetaction.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QWIDGETACTION_H
6
#
define
QWIDGETACTION_H
7
8
#
include
<
QtWidgets
/
qtwidgetsglobal
.
h
>
9
#
include
<
QtGui
/
qaction
.
h
>
10
11
QT_REQUIRE_CONFIG
(
action
);
12
13
QT_BEGIN_NAMESPACE
14
15
class
QWidgetActionPrivate;
16
17
class
Q_WIDGETS_EXPORT
QWidgetAction
:
public
QAction
18
{
19
Q_OBJECT
20
Q_DECLARE_PRIVATE(QWidgetAction)
21
22
public
:
23
explicit
QWidgetAction(QObject *parent);
24
virtual
~QWidgetAction();
25
26
void
setDefaultWidget(QWidget *w);
27
QWidget *defaultWidget()
const
;
28
29
QWidget *requestWidget(QWidget *parent);
30
void
releaseWidget(QWidget *widget);
31
32
protected
:
33
virtual
bool
event(QEvent *) override;
34
virtual
bool
eventFilter(QObject *, QEvent *) override;
35
virtual
QWidget *createWidget(QWidget *parent);
36
virtual
void
deleteWidget(QWidget *widget);
37
QList<QWidget *> createdWidgets()
const
;
38
39
private
:
40
Q_DISABLE_COPY(QWidgetAction)
41
friend
class
QToolBar;
42
};
43
44
QT_END_NAMESPACE
45
46
#
endif
// QWIDGETACTION_H
QWidgetAction
The QWidgetAction class extends QAction by an interface for inserting custom widgets into action base...
Definition
qwidgetaction.h:18
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(action)
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
widgets
kernel
qwidgetaction.h
Generated on
for Qt by
1.18.0