summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-14 09:44:56 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-04-14 12:56:39 (GMT)
commitb15ec327df81f8b0d4934ee2f52a7ccc6a8281c2 (patch)
treed9312c63e75bd05c094d6c9ebf67a6942813ee4f /src/gui
parent91aeceb7132f4afae0996443a162a5783d8f17aa (diff)
downloadQt-b15ec327df81f8b0d4934ee2f52a7ccc6a8281c2.zip
Qt-b15ec327df81f8b0d4934ee2f52a7ccc6a8281c2.tar.gz
Qt-b15ec327df81f8b0d4934ee2f52a7ccc6a8281c2.tar.bz2
Fixes: QTreeView font change regression if there is an application stylesheet
The way font propagation work has changed since 4.4: When there is a stylesheet enabled, font does not propagate. So when settings a font to the QAbstractItemView, the viewport font will not change, and hence no QEvent::FontChange on it. So catch the QEvent::FontChange in QAbstractItemView::event in addition to QAbstractItemView::viewportEvent. (we seems to use the view's font everywhere anyway) Task-number: 250754 Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 7bd6207..55b3a03 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1400,6 +1400,9 @@ bool QAbstractItemView::event(QEvent *event)
case QEvent::FocusOut:
d->checkPersistentEditorFocus();
break;
+ case QEvent::FontChange:
+ d->doDelayedItemsLayout(); // the size of the items will change
+ break;
default:
break;
}