summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-01-16 11:44:20 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-01-16 11:48:55 +0100
commite2a546a18be88f380b3d9d3efbed390fe1a9e93f (patch)
treef7a6a0c7a60ee7b771ee9d6256c385f761113135 /src/widgets
parent0be8f59d725d4a5e79709487e3aac1d351a6c04c (diff)
parent99b89d30fa5484c5d1f3cbda828648c28af4fb7d (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/itemviews/qtreeview.cpp3
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 569351ff87..7696b75661 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -237,6 +237,9 @@ void QTreeView::setModel(QAbstractItemModel *model)
// QAbstractItemView connects to a private slot
disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
+ // do header layout after the tree
+ disconnect(d->model, SIGNAL(layoutChanged()),
+ d->header, SLOT(_q_layoutChanged()));
// QTreeView has a public slot for this
connect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(rowsRemoved(QModelIndex,int,int)));
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 494b28c909..9d5a117aa0 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -3649,6 +3649,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
QFont oldFont = p->font();
if (subRule.hasFont)
p->setFont(subRule.font.resolve(p->font()));
+ else
+ p->setFont(mi.font);
// We fall back to drawing with the style sheet code whenever at least one of the
// items are styled in an incompatible way, such as having a background image.
@@ -3765,8 +3767,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
}
- if (subRule.hasFont)
- p->setFont(oldFont);
+ p->setFont(oldFont);
return;
}