diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-30 16:42:12 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-23 21:51:43 +0200 |
commit | 1b7ce85a606261936efd3b3c7d73a71b5884e426 (patch) | |
tree | f76713753768436ba14a98f01874456dc65bf8b0 /examples/widgets/painting | |
parent | 5d94aac2bae8bdbf8de7cebeb6a1a17a81685f0a (diff) |
Remove usages of deprecated APIs of QWheelEvent
- Replaced the usages of deprecated QWheelEvent::delta() and
QWheelEvent::orientation() with QWheelEvent::angleDelta().
In most of the examples it is acceptable to use only the vertical
component of angle delta.
- Made the docs APIs to build conditionally, based on the
deprecation version.
Task-number: QTBUG-76491
Task-number: QTBUG-76540
Change-Id: Id4230d483f724af49e4b6349b44881c3944de2a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r-- | examples/widgets/painting/affine/xform.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp index 482e0f3268..50acf0f814 100644 --- a/examples/widgets/painting/affine/xform.cpp +++ b/examples/widgets/painting/affine/xform.cpp @@ -260,7 +260,7 @@ void XFormView::timerEvent(QTimerEvent *e) #if QT_CONFIG(wheelevent) void XFormView::wheelEvent(QWheelEvent *e) { - m_scale += e->delta() / qreal(600); + m_scale += e->angleDelta().y() / qreal(600); m_scale = qMax(qreal(0.1), qMin(qreal(4), m_scale)); emit scaleChanged(int(m_scale*1000)); } |