summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-14 11:44:56 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-04-14 14:56:39 +0200
commitb15ec327df81f8b0d4934ee2f52a7ccc6a8281c2 (patch)
treed9312c63e75bd05c094d6c9ebf67a6942813ee4f /src/gui/itemviews
parent91aeceb7132f4afae0996443a162a5783d8f17aa (diff)
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/itemviews')
-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 7bd6207c8b..55b3a037a3 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;
}