diff options
author | David Edmundson <davidedmundson@kde.org> | 2016-06-13 17:56:49 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-07-28 07:15:27 +0000 |
commit | ebb651aa7395bd28474580a10f7d389c72f39e14 (patch) | |
tree | 17d9e82eb666bc3adcbeb45be99d4ecf8833886a /src | |
parent | d12a284bbbf1192502e7dcd49031781ce9b54d01 (diff) |
Handle device pixel ratio in QTreeWidget animations
As we are rendering into a new paint device we need to copy the device
pixel ratio from the widget.
Task-number: QTBUG-50207
Change-Id: Ica99ae84fe04311edfef817ab719863d627faf64
(cherry picked from commit 49491dd678071661db2e34133c051cb176a83e0b)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/itemviews/qtreeview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 01ebae0848..3a2005b95c 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -3244,7 +3244,8 @@ void QTreeViewPrivate::drawAnimatedOperation(QPainter *painter) const QPixmap QTreeViewPrivate::renderTreeToPixmapForAnimation(const QRect &rect) const { Q_Q(const QTreeView); - QPixmap pixmap(rect.size()); + QPixmap pixmap(rect.size() * q->devicePixelRatio()); + pixmap.setDevicePixelRatio(q->devicePixelRatio()); if (rect.size().isEmpty()) return pixmap; pixmap.fill(Qt::transparent); //the base might not be opaque, and we don't want uninitialized pixels. |