Home · All Classes · All Functions · Overviews

QWidgetItem Class Reference
[
QtGui module]

The QWidgetItem class is a layout item that represents a widget. More...

 #include <QWidgetItem>

Inherits QLayoutItem.


Public Functions

QWidgetItem ( QWidget * widget )

Reimplemented Public Functions

virtual Qt::Orientations expandingDirections () const
virtual QRect geometry () const
virtual bool hasHeightForWidth () const
virtual int heightForWidth ( int w ) const
virtual bool isEmpty () const
virtual QSize maximumSize () const
virtual QSize minimumSize () const
virtual void setGeometry ( const QRect & rect )
virtual QSize sizeHint () const
virtual QWidget * widget ()

Detailed Description

The QWidgetItem class is a layout item that represents a widget.

Normally, you don't need to use this class directly. Qt's built-in layout managers provide the following functions for manipulating widgets in layouts:

ClassFunctions
QBoxLayoutaddWidget(), insertWidget(), setStretchFactor()
QGridLayoutaddWidget()
QStackedLayoutaddWidget(), insertWidget(), currentWidget(), setCurrentWidget(), widget()

See also QLayout, QSpacerItem, and QLayoutItem::widget().


Member Function Documentation

QWidgetItem::QWidgetItem ( QWidget * widget )

Creates an item containing the given widget.

Qt::Orientations QWidgetItem::expandingDirections () const   [virtual]

Reimplemented from QLayoutItem::expandingDirections().

QRect QWidgetItem::geometry () const   [virtual]

Reimplemented from QLayoutItem::geometry().

See also setGeometry().

bool QWidgetItem::hasHeightForWidth () const   [virtual]

Reimplemented from QLayoutItem::hasHeightForWidth().

int QWidgetItem::heightForWidth ( int w ) const   [virtual]

Reimplemented from QLayoutItem::heightForWidth().

bool QWidgetItem::isEmpty () const   [virtual]

Reimplemented from QLayoutItem::isEmpty().

Returns true if the widget is hidden; otherwise returns false.

See also QWidget::isHidden().

QSize QWidgetItem::maximumSize () const   [virtual]

Reimplemented from QLayoutItem::maximumSize().

QSize QWidgetItem::minimumSize () const   [virtual]

Reimplemented from QLayoutItem::minimumSize().

void QWidgetItem::setGeometry ( const QRect & rect )   [virtual]

Reimplemented from QLayoutItem::setGeometry().

See also geometry().

QSize QWidgetItem::sizeHint () const   [virtual]

Reimplemented from QLayoutItem::sizeHint().

QWidget * QWidgetItem::widget ()   [virtual]

Reimplemented from QLayoutItem::widget().

Returns the widget managed by this item.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.0