diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-03-21 09:02:57 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-03-21 09:02:57 +0100 |
commit | 6cb8121a44ee0f94f2c9fcb075d1d3c802d8c5c7 (patch) | |
tree | 25822898b71068f820d25a9e8372dfb348190ec1 /tests/manual/highdpi/dragwidget.cpp | |
parent | 96740193e1e0f0608f67660811a44b696924ad4c (diff) | |
parent | 2e02de165115c9d67ac343ff0960ed80f9c09bc8 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/widgets/styles/qgtkstyle_p.cpp
tests/auto/corelib/io/qtextstream/test/test.pro
tests/auto/corelib/plugin/plugin.pro
Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
Diffstat (limited to 'tests/manual/highdpi/dragwidget.cpp')
-rw-r--r-- | tests/manual/highdpi/dragwidget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/manual/highdpi/dragwidget.cpp b/tests/manual/highdpi/dragwidget.cpp index b5ad6fa63b..fc1ea72963 100644 --- a/tests/manual/highdpi/dragwidget.cpp +++ b/tests/manual/highdpi/dragwidget.cpp @@ -163,7 +163,11 @@ void DragWidget::mousePressEvent(QMouseEvent *event) mimeData->setData("application/x-hotspot", QByteArray::number(hotSpot.x()) + ' ' + QByteArray::number(hotSpot.y())); - QPixmap pixmap(child->size()); + const qreal dpr = devicePixelRatioF() > 1 && !(QGuiApplication::keyboardModifiers() & Qt::ShiftModifier) + ? devicePixelRatioF() : 1; + + QPixmap pixmap(child->size() * dpr); + pixmap.setDevicePixelRatio(dpr); child->render(&pixmap); QDrag *drag = new QDrag(this); |