From 403f533b09df5982c9d9ffea35a9ff8363704869 Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Wed, 16 Sep 2009 20:28:11 -0300 Subject: 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 --- examples/graphicsview/anchorlayout/main.cpp | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v0.12