Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QSpacerItem Class

TheQSpacerItem class provides blank space in a layout.More...

Header:#include <QSpacerItem>
Inherits:QLayoutItem

Public Functions

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

Reimplemented Public Functions

virtual Qt::OrientationsexpandingDirections() const
virtual QRectgeometry() const
virtual boolisEmpty() const
virtual QSizemaximumSize() const
virtual QSizeminimumSize() const
virtual voidsetGeometry(const QRect & r)
virtual QSizesizeHint() const
virtual QSpacerItem *spacerItem()

Detailed Description

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().

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 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.

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

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() const

Reimplemented fromQLayoutItem::expandingDirections().

[virtual]QRect QSpacerItem::geometry() const

Reimplemented fromQLayoutItem::geometry().

See alsosetGeometry().

[virtual]bool QSpacerItem::isEmpty() const

Reimplemented fromQLayoutItem::isEmpty().

Returns true.

[virtual]QSize QSpacerItem::maximumSize() const

Reimplemented fromQLayoutItem::maximumSize().

[virtual]QSize QSpacerItem::minimumSize() const

Reimplemented fromQLayoutItem::minimumSize().

[virtual]void QSpacerItem::setGeometry(constQRect & r)

Reimplemented fromQLayoutItem::setGeometry().

See alsogeometry().

[virtual]QSize QSpacerItem::sizeHint() const

Reimplemented 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.


[8]ページ先頭

©2009-2025 Movatter.jp