Commit 79f8579d authored by David Jarvie's avatar David Jarvie
Browse files

Make it build on Qt <5.14

parent 7ec1e867
......@@ -678,12 +678,20 @@ void SpinMirror::wheelEvent(QWheelEvent* e)
{
if (mReadOnly)
return;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QPointF pt = e->position();
#else
QPointF pt = e->posF();
#endif
QGraphicsItem* item = scene()->itemAt(pt, QTransform());
if (item == mButtons)
{
pt = spinboxPoint(pt);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QApplication::postEvent(mSpinbox, new QWheelEvent(pt, e->globalPosF(), e->pixelDelta(), e->angleDelta(), e->buttons(), e->modifiers(), e->phase(), e->inverted(), e->source()));
#else
QApplication::postEvent(mSpinbox, new QWheelEvent(pt, e->globalPosition(), e->pixelDelta(), e->angleDelta(), e->buttons(), e->modifiers(), e->phase(), e->inverted(), e->source()));
#endif
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment