QSpacerItem Class

Qt 3.0.5

Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QSpacerItem Class Reference

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

#include <qlayout.h>

Inherits QLayoutItem.

List of all member functions.

Public Members

  • QSpacerItem ( int w, int h, QSizePolicy::SizeType hData = QSizePolicy::Minimum, QSizePolicy::SizeType vData = QSizePolicy::Minimum )
  • void changeSize ( int w, int h, QSizePolicy::SizeType hData = QSizePolicy::Minimum, QSizePolicy::SizeType vData = QSizePolicy::Minimum )
  • virtual QSize sizeHint () const
  • virtual QSize minimumSize () const
  • virtual QSize maximumSize () const
  • virtual QSizePolicy::ExpandData expanding () const
  • virtual bool isEmpty () const
  • virtual void setGeometry ( const QRect & r )

Detailed Description

The QSpacerItem class provides blank space in a layout.

This class is used by custom layouts.

See also QLayout, QLayout::spacerItem(), Widget Appearance and Style and Layout Management.


Member Function Documentation

QSpacerItem::QSpacerItem ( int w, int h, QSizePolicy::SizeType hData = QSizePolicy::Minimum, QSizePolicy::SizeType vData = QSizePolicy::Minimum )

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

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::SizeType hData = QSizePolicy::Minimum, QSizePolicy::SizeType vData = QSizePolicy::Minimum )

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

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

QSizePolicy::ExpandData QSpacerItem::expanding () const [virtual]

Returns TRUE if this spacer item is expanding; otherwise returns FALSE.

Reimplemented from QLayoutItem.

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.


This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.


Copyright © 2002 TrolltechTrademarks
Qt version 3.0.5