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
qstackedwidget.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 QSTACKEDWIDGET_H
5#define QSTACKEDWIDGET_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qframe.h>
9
10QT_REQUIRE_CONFIG(stackedwidget);
11
13
15
16class Q_WIDGETS_EXPORT QStackedWidget : public QFrame
17{
19
20 Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentChanged)
22public:
23 explicit QStackedWidget(QWidget *parent = nullptr);
25
26 int addWidget(QWidget *w);
27 int insertWidget(int index, QWidget *w);
28 void removeWidget(QWidget *w);
29
30 QWidget *currentWidget() const;
31 int currentIndex() const;
32
33 int indexOf(const QWidget *) const;
34 QWidget *widget(int) const;
35 int count() const;
36
37public Q_SLOTS:
38 void setCurrentIndex(int index);
39 void setCurrentWidget(QWidget *w);
40
42 void currentChanged(int);
43 void widgetRemoved(int index);
44
45protected:
46 bool event(QEvent *e) override;
47
49 Q_DISABLE_COPY(QStackedWidget)
50 Q_DECLARE_PRIVATE(QStackedWidget)
51};
52
54
55#endif // QSTACKEDWIDGET_H
\inmodule QtCore
Definition qcoreevent.h:45
The QFrame class is the base class of widgets that can have a frame.
Definition qframe.h:17
The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.
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]
GLuint index
[2]
GLenum GLenum GLsizei count
struct _cl_event * event
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit
list indexOf("B")
gridLayout addWidget(nameLabel, 0, 0)