Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 friend class QToolBar;
41};
42
44
45#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
\inmodule QtCore
Definition qobject.h:103
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