
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQSpacerItem class provides blank space in a layout.More...
| Header: | #include <QSpacerItem> |
| Inherits: | QLayoutItem |
| 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) |
| virtual Qt::Orientations | expandingDirections() const |
| virtual QRect | geometry() const |
| virtual bool | isEmpty() const |
| virtual QSize | maximumSize() const |
| virtual QSize | minimumSize() const |
| virtual void | setGeometry(const QRect & r) |
| virtual QSize | sizeHint() const |
| virtual QSpacerItem * | spacerItem() |
TheQSpacerItem class provides blank space in a layout.
Normally, you don't need to use this class directly. Qt's built-in layout managers provide the following functions for manipulating empty space in layouts:
See alsoQLayout,QWidgetItem, andQLayoutItem::spacerItem().
Constructs a spacer item with preferred widthw, preferred heighth, horizontal size policyhPolicy and vertical size policyvPolicy.
The default values provide a gap that is able to stretch if nothing else wants the space.
Changes this spacer item to have preferred widthw, preferred heighth, horizontal size policyhPolicy and vertical size policyvPolicy.
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.
See alsoQSpacerItem::invalidate().
[virtual]Qt::Orientations QSpacerItem::expandingDirections() constReimplemented fromQLayoutItem::expandingDirections().
[virtual]QRect QSpacerItem::geometry() constReimplemented fromQLayoutItem::geometry().
See alsosetGeometry().
[virtual]bool QSpacerItem::isEmpty() constReimplemented fromQLayoutItem::isEmpty().
Returns true.
[virtual]QSize QSpacerItem::maximumSize() constReimplemented fromQLayoutItem::maximumSize().
[virtual]QSize QSpacerItem::minimumSize() constReimplemented fromQLayoutItem::minimumSize().
[virtual]void QSpacerItem::setGeometry(constQRect & r)Reimplemented fromQLayoutItem::setGeometry().
See alsogeometry().
[virtual]QSize QSpacerItem::sizeHint() constReimplemented fromQLayoutItem::sizeHint().
[virtual]QSpacerItem * QSpacerItem::spacerItem()Reimplemented fromQLayoutItem::spacerItem().
Returns a pointer to this object.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.