Warning, file /include/QtWidgets/qstackedwidget.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QSTACKEDWIDGET_H
0005 #define QSTACKEDWIDGET_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qframe.h>
0009
0010 QT_REQUIRE_CONFIG(stackedwidget);
0011
0012 QT_BEGIN_NAMESPACE
0013
0014 class QStackedWidgetPrivate;
0015
0016 class Q_WIDGETS_EXPORT QStackedWidget : public QFrame
0017 {
0018 Q_OBJECT
0019
0020 Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentChanged)
0021 Q_PROPERTY(int count READ count)
0022 public:
0023 explicit QStackedWidget(QWidget *parent = nullptr);
0024 ~QStackedWidget();
0025
0026 int addWidget(QWidget *w);
0027 int insertWidget(int index, QWidget *w);
0028 void removeWidget(QWidget *w);
0029
0030 QWidget *currentWidget() const;
0031 int currentIndex() const;
0032
0033 int indexOf(const QWidget *) const;
0034 QWidget *widget(int) const;
0035 int count() const;
0036
0037 public Q_SLOTS:
0038 void setCurrentIndex(int index);
0039 void setCurrentWidget(QWidget *w);
0040
0041 Q_SIGNALS:
0042 void currentChanged(int);
0043 void widgetRemoved(int index);
0044
0045 protected:
0046 bool event(QEvent *e) override;
0047
0048 private:
0049 Q_DISABLE_COPY(QStackedWidget)
0050 Q_DECLARE_PRIVATE(QStackedWidget)
0051 };
0052
0053 QT_END_NAMESPACE
0054
0055 #endif