diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-21 11:08:42 +0200 |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-21 11:08:42 +0200 |
commit | 5bbb23c6e2858d01716abe27e93e91d466b00d41 (patch) | |
tree | 8948cdf80e16783e09e17b7ac691954a3b7a2d62 /src/gui/graphicsview/qgraphicsanchorlayout.cpp | |
parent | a072ddb5072d837ff6d2ff1f09800e8e3917f034 (diff) | |
parent | 7b09b0eda2f3e5bc34150669157287ccb85c8d72 (diff) | |
download | qt4-tools-5bbb23c6e2858d01716abe27e93e91d466b00d41.tar.gz |
Merge branch 'qgal-api' into 4.6
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index cb8ccc12a0..081572f2bc 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -118,16 +118,26 @@ QGraphicsAnchor::~QGraphicsAnchor() } /*! - Sets the size policy of the anchor to \a policy. + \property QGraphicsAnchor::sizePolicy + \brief the size policy for the QGraphicsAnchor. + + By setting the size policy on an anchor you can configure how the item can resize itself + from its preferred spacing. For instance, if the anchor has the size policy + QSizePolicy::Minimum, the spacing is the minimum size of the anchor. However, its size + can grow up to the anchors maximum size. If the default size policy is QSizePolicy::Fixed, + the anchor can neither grow or shrink, which means that the only size the anchor can have + is the spacing. QSizePolicy::Fixed is the default size policy. + QGraphicsAnchor always has a minimum spacing of 0 and a very large maximum spacing. + + \sa QGraphicsAnchor::spacing */ + void QGraphicsAnchor::setSizePolicy(QSizePolicy::Policy policy) { Q_D(QGraphicsAnchor); d->setSizePolicy(policy); } -/*! - Returns the size policy of the anchor. The default size policy is QSizePolicy::Fixed -*/ + QSizePolicy::Policy QGraphicsAnchor::sizePolicy() const { Q_D(const QGraphicsAnchor); @@ -136,12 +146,12 @@ QSizePolicy::Policy QGraphicsAnchor::sizePolicy() const /*! \property QGraphicsAnchor::spacing - \brief the space between items in the QGraphicsAnchorLayout. + \brief the preferred space between items in the QGraphicsAnchorLayout. Depending on the anchor type, the default spacing is either 0 or a value returned from the style. - \sa QGraphicsAnchorLayout::anchor() + \sa QGraphicsAnchorLayout::addAnchor() */ void QGraphicsAnchor::setSpacing(qreal spacing) { |