diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-02-15 12:40:32 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-04-14 10:27:57 (GMT) |
commit | febdcef08f22310cbd70ec13b315f70ff8e41e83 (patch) | |
tree | 112fcdcd88ad3efb66f1b04180b9bb740aefedf5 /src/gui/graphicsview | |
parent | 5b3872b2d7523d44ba454a76613e7a3fa45387f7 (diff) | |
download | Qt-febdcef08f22310cbd70ec13b315f70ff8e41e83.zip Qt-febdcef08f22310cbd70ec13b315f70ff8e41e83.tar.gz Qt-febdcef08f22310cbd70ec13b315f70ff8e41e83.tar.bz2 |
Do not call setSizePolicy from ctor, it might call a virtual function
More specifically, it might very well call updateGeometry()
Reviewed-by: Frederik Gladhorn
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicslayout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp index ed213f1..0ee1f06 100644 --- a/src/gui/graphicsview/qgraphicslayout.cpp +++ b/src/gui/graphicsview/qgraphicslayout.cpp @@ -167,7 +167,7 @@ QGraphicsLayout::QGraphicsLayout(QGraphicsLayoutItem *parent) " neither a QGraphicsWidget nor QGraphicsLayout"); } } - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType); + d_func()->sizePolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType); setOwnedByLayout(true); } @@ -188,7 +188,7 @@ QGraphicsLayout::QGraphicsLayout(QGraphicsLayoutPrivate &dd, QGraphicsLayoutItem " neither a QGraphicsWidget nor QGraphicsLayout"); } } - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType); + d_func()->sizePolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType); setOwnedByLayout(true); } |