diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-03-24 09:39:52 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-03-24 09:51:32 (GMT) |
commit | 22d472c17167c4ca8df5678842768ab63b7baadd (patch) | |
tree | 9284e29c3ba3c8bb3a285c06a20a6e0541c4d33e /src/gui/graphicsview/qgraphicswidget_p.cpp | |
parent | e773b0486a4784994a900c03a2620baf2775ac9d (diff) | |
download | Qt-22d472c17167c4ca8df5678842768ab63b7baadd.zip Qt-22d472c17167c4ca8df5678842768ab63b7baadd.tar.gz Qt-22d472c17167c4ca8df5678842768ab63b7baadd.tar.bz2 |
Do not cache the sizeHint() while we're in QGraphicsWidget's constructor.
Do not send a QFontChange event before the item has been polished. This
is because we cannot call a virtual function while we're in the ctor.
This is basically the same as how we do it in QWidget.
Task-number: 246215
Reviewed-by: alexis
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget_p.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp index 641409d..789f8da 100644 --- a/src/gui/graphicsview/qgraphicswidget_p.cpp +++ b/src/gui/graphicsview/qgraphicswidget_p.cpp @@ -274,6 +274,8 @@ void QGraphicsWidgetPrivate::updateFont(const QFont &font) } } + if (!polished) + return; // Notify change. QEvent event(QEvent::FontChange); QApplication::sendEvent(q, &event); |