Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions

QSpacerItem Class Reference

The QSpacerItem class provides blank space in a layout. More...

#include <QSpacerItem>

Part of the QtGui module.

Inherits QLayoutItem.

Public Functions


Detailed Description

The QSpacerItem class provides blank space in a layout.

This class is used by custom layouts.

See also QLayout and QLayout::spacerItem().


Member Function Documentation

QSpacerItem::QSpacerItem ( int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum )

Constructs a spacer item with preferred width w, preferred height h, horizontal size policy hPolicy and vertical size policy vPolicy.

The default values provide a gap that is able to stretch if nothing else wants the space.

void QSpacerItem::changeSize ( int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum )

Changes this spacer item to have preferred width w, preferred height h, horizontal size policy hPolicy and vertical size policy vPolicy.

The default values provide a gap that is able to stretch if nothing else wants the space.

bool QSpacerItem::isEmpty () const   [virtual]

Returns true because a spacer item never contains widgets.

Reimplemented from QLayoutItem.

QSize QSpacerItem::maximumSize () const   [virtual]

Returns the maximum size of this spacer item.

Reimplemented from QLayoutItem.

QSize QSpacerItem::minimumSize () const   [virtual]

Returns the minimum size of this spacer item.

Reimplemented from QLayoutItem.

void QSpacerItem::setGeometry ( const QRect & r )   [virtual]

Stores the spacer item's rect r so that it can be returned by geometry().

Reimplemented from QLayoutItem.

QSize QSpacerItem::sizeHint () const   [virtual]

Returns the preferred size of this spacer item.

Reimplemented from QLayoutItem.


Copyright © 2005 Trolltech Trademarks
Qt 4.0.0-b2