summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-20 22:34:43 +0100
committerLiang Qi <liang.qi@qt.io>2018-01-20 22:36:19 +0100
commit65a97fccc67ae7f3df1900e1419955f939a49b9f (patch)
treea8fd0e119b585123e77e3b2574f2d82a5474eb28 /src/widgets
parent5e8bc07cb2ded1f5f74435411de666f419869514 (diff)
parent1303327a713d8f88fd9782e4f887b646d4210f68 (diff)
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
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 01d7f23947..bb0c26fc77 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 7c553a9e1c..9ce1a04d86 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -3644,6 +3644,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.
@@ -3760,8 +3762,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
}
- if (subRule.hasFont)
- p->setFont(oldFont);
+ p->setFont(oldFont);
return;
}