summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>2009-09-16 20:28:11 -0300
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-18 10:28:28 +0200
commit403f533b09df5982c9d9ffea35a9ff8363704869 (patch)
tree65bdc6b1e6cce1f751c5c52821df6301ddc23a62
parent91cd65ff36b0465c3eef4e1575f064c1cf7e9236 (diff)
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>
-rw-r--r--examples/graphicsview/anchorlayout/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp
index a4bf1d040e..3e19f18536 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;
}