Qt 6.x
The Qt SDK
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
4#ifndef QWIDGETACTION_H
5#define QWIDGETACTION_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtGui/qaction.h>
9
11
13
15
16class Q_WIDGETS_EXPORT QWidgetAction : public QAction
17{
19 Q_DECLARE_PRIVATE(QWidgetAction)
20
21public:
22 explicit QWidgetAction(QObject *parent);
23 virtual ~QWidgetAction();
24
25 void setDefaultWidget(QWidget *w);
26 QWidget *defaultWidget() const;
27
28 QWidget *requestWidget(QWidget *parent);
29 void releaseWidget(QWidget *widget);
30
31protected:
32 virtual bool event(QEvent *) override;
33 virtual bool eventFilter(QObject *, QEvent *) override;
34 virtual QWidget *createWidget(QWidget *parent);
35 virtual void deleteWidget(QWidget *widget);
36 QList<QWidget *> createdWidgets() const;
37
38private:
39 Q_DISABLE_COPY(QWidgetAction)
40 Q_PRIVATE_SLOT(d_func(), void _q_widgetDestroyed(QObject *))
41 friend class QToolBar;
42};
43
45
46#endif // QWIDGETACTION_H
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
\inmodule QtCore
Definition qcoreevent.h:45
Definition qlist.h:74
\inmodule QtCore
Definition qobject.h:90
virtual bool eventFilter(QObject *watched, QEvent *event)
Filters events if this object has been installed as an event filter for the watched object.
Definition qobject.cpp:1518
The QToolBar class provides a movable panel that contains a set of controls.
Definition qtoolbar.h:23
The QWidgetAction class extends QAction by an interface for inserting custom widgets into action base...
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
Combined button and popup list for selecting options.
GLfloat GLfloat GLfloat w
[0]
struct _cl_event * event
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
#define Q_PRIVATE_SLOT(d, signature)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent