44 #ifndef QT_NO_STACKEDWIDGET 48 #include <private/qframe_p.h> 69 const int n =
count();
71 for (
int i = 0; i < n; ++i) {
73 if (item->hasHeightForWidth())
82 const int n =
count();
85 for (
int i = 0; i < n; ++i) {
87 if (
QWidget *w = item->widget())
88 hfw =
qMax(hfw, w->heightForWidth(width));
219 return d_func()->layout->addWidget(widget);
239 return d_func()->layout->insertWidget(index, widget);
253 d_func()->layout->removeWidget(widget);
273 d_func()->layout->setCurrentIndex(index);
278 return d_func()->layout->currentIndex();
288 return d_func()->
layout->currentWidget();
303 if (
d->layout->indexOf(widget) == -1) {
304 qWarning(
"QStackedWidget::setCurrentWidget: widget %p not contained in stack", widget);
307 d->layout->setCurrentWidget(widget);
318 return d_func()->layout->indexOf(widget);
345 return d_func()->layout->count();
356 #endif // QT_NO_STACKEDWIDGET
#define QT_END_NAMESPACE
This macro expands to.
int heightForWidth(int width) const
Returns the preferred height for this layout item, given the width w.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
The QStackedLayout class provides a stack of widgets where only one widget is visible at a time...
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QLayoutItem class provides an abstract item that a QLayout manipulates.
int count() const
the number of widgets contained in the layout
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool hasHeightForWidth() const
Returns true if this layout's preferred height depends on its width; otherwise returns false...
Q_CORE_EXPORT void qWarning(const char *,...)
QSize minimumSize() const
Reimplemented Function
#define Q_DECLARE_PUBLIC(Class)
QObject * parent() const
Returns a pointer to the parent object.
bool event(QEvent *e)
Reimplemented Function
virtual QWidget * widget()
If this item is a QWidget, it is returned as a QWidget; otherwise 0 is returned.
QLayout * layout()
Reimplemented Function
QStackedLayoutHFW(QWidget *parent=0)
QLayoutItem * itemAt(int) const
Reimplemented Function
The QEvent class is the base class of all event classes.
The QFrame class is the base class of widgets that can have a frame.