diff options
author | Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org> | 2009-09-16 23:28:11 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-09-18 08:28:28 (GMT) |
commit | 403f533b09df5982c9d9ffea35a9ff8363704869 (patch) | |
tree | 65bdc6b1e6cce1f751c5c52821df6301ddc23a62 /examples/graphicsview | |
parent | 91cd65ff36b0465c3eef4e1575f064c1cf7e9236 (diff) | |
download | Qt-403f533b09df5982c9d9ffea35a9ff8363704869.zip Qt-403f533b09df5982c9d9ffea35a9ff8363704869.tar.gz Qt-403f533b09df5982c9d9ffea35a9ff8363704869.tar.bz2 |
QGraphicsAnchorLayout: Set size policy in the example
Set QSizePolicy::Preferred to all proxy widgets (after setWidgeT) in the
QGraphicsAnchorLayout example to avoid "QSimplex: No feasible solution!"
that occurs when all items are set with QPushButton's default size policy.
Signed-off-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
Diffstat (limited to 'examples/graphicsview')
-rw-r--r-- | examples/graphicsview/anchorlayout/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp index a4bf1d0..3e19f18 100644 --- a/examples/graphicsview/anchorlayout/main.cpp +++ b/examples/graphicsview/anchorlayout/main.cpp @@ -56,6 +56,7 @@ static QGraphicsProxyWidget *createItem(const QSizeF &minimum = QSizeF(100.0, 10 w->setPreferredSize(preferred); w->setMaximumSize(maximum); + w->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); return w; } |