diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index a82859a36c4..3b8cb04a909 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -1185,9 +1185,17 @@ void Qt5InformationNodeInstanceServer::inputEvent(const InputEventCommand &comma { if (m_editView3D) { if (command.type() == QEvent::Wheel) { - auto we = new QWheelEvent(command.pos(), command.pos(), {0, 0}, {0, command.angleDelta()}, + QWheelEvent *we +#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) + = new QWheelEvent(command.pos(), command.pos(), {0, 0}, {0, command.angleDelta()}, command.buttons(), command.modifiers(), Qt::NoScrollPhase, false); +#else + = new QWheelEvent(command.pos(), command.pos(), {0, 0}, {0, command.angleDelta()}, + 0, Qt::Horizontal, command.buttons(), command.modifiers(), + Qt::NoScrollPhase, Qt::MouseEventNotSynthesized); +#endif + QGuiApplication::postEvent(m_editView3D, we); } else { auto me = new QMouseEvent(command.type(), command.pos(), command.button(), diff --git a/tests/auto/qml/qmldesigner/coretests/coretests.pro b/tests/auto/qml/qmldesigner/coretests/coretests.pro index fbc7f4f0e2e..8a86681e62c 100644 --- a/tests/auto/qml/qmldesigner/coretests/coretests.pro +++ b/tests/auto/qml/qmldesigner/coretests/coretests.pro @@ -49,6 +49,7 @@ INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/stateseditor INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/formeditor INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/propertyeditor INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/debugview +INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/edit3d INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/3rdparty include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore-lib.pri)