From dd89851abe4b0d0a3c293b5cadace00eb3f75a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Tue, 27 Oct 2009 11:01:45 +0100 Subject: If a QGraphicsWidget gets a StyleChange event, invalidate its layout. The layout should be invalidated because all layouts are dependent on some style-specific defaults. (e.g. PM_LayoutHorizontalSpacing can differ.) Reviewed-by: alexis --- src/gui/graphicsview/qgraphicswidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 35a3c13..d70a281 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -1352,6 +1352,8 @@ void QGraphicsWidget::changeEvent(QEvent *event) case QEvent::StyleChange: // ### Don't unset if the margins are explicitly set. unsetWindowFrameMargins(); + if (d->layout) + d->layout->invalidate(); case QEvent::FontChange: update(); updateGeometry(); -- cgit v0.12