CopperSpice API
1.9.2
|
The QSpacerItem class provides blank space in a layout. More...
Public Methods | |
QSpacerItem (int w, int h, QSizePolicy::Policy hPolicy=QSizePolicy::Minimum, QSizePolicy::Policy vPolicy=QSizePolicy::Minimum) | |
void | changeSize (int w, int h, QSizePolicy::Policy hPolicy=QSizePolicy::Minimum, QSizePolicy::Policy vPolicy=QSizePolicy::Minimum) |
Qt::Orientations | expandingDirections () const override |
QRect | geometry () const override |
bool | isEmpty () const override |
QSize | maximumSize () const override |
QSize | minimumSize () const override |
void | setGeometry (const QRect &rect) override |
QSize | sizeHint () const override |
QSizePolicy | sizePolicy () const |
QSpacerItem * | spacerItem () override |
Public Methods inherited from QLayoutItem | |
QLayoutItem (Qt::Alignment alignment=Qt::Alignment ()) | |
virtual | ~QLayoutItem () |
Qt::Alignment | alignment () const |
virtual QSizePolicy::ControlTypes | controlTypes () const |
virtual bool | hasHeightForWidth () const |
virtual int | heightForWidth (int width) const |
virtual void | invalidate () |
virtual QLayout * | layout () |
virtual int | minimumHeightForWidth (int width) const |
void | setAlignment (Qt::Alignment alignment) |
virtual QWidget * | widget () |
The QSpacerItem class provides blank space in a layout. Normally, you do not need to use this class directly. The CopperSpice built-in layout managers provide the following methods for crearting empty space in layouts.
Class | Functions |
---|---|
QHBoxLayout | addSpacing(), addStretch(), insertSpacing(), insertStretch() |
QGridLayout | setRowMinimumHeight(), setRowStretch(), setColumnMinimumWidth(), setColumnStretch() |
|
inline |
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.
Note that if changeSize() is called after the spacer item has been added to a layout, it is necessary to invalidate the layout in order for the spacer item's new size to take effect.
|
overridevirtual |
Implements QLayoutItem::expandingDirections()
|
overridevirtual |
Implements QLayoutItem::geometry()
|
overridevirtual |
Always returns true.
Implements QLayoutItem::isEmpty()
|
overridevirtual |
Implements QLayoutItem::maximumSize()
|
overridevirtual |
Implements QLayoutItem::minimumSize()
|
overridevirtual |
Implements QLayoutItem::setGeometry()
|
overridevirtual |
Implements QLayoutItem::sizeHint()
|
inline |
Returns the value of the property.
|
overridevirtual |
Returns a pointer to this object.
Reimplemented from QLayoutItem::spacerItem()