Fix touch on PointerHandlers
The events we forward to the offscreen QML view are with our own QPointingDevice instance, which has a devicetype of touch but a null pointerType. In Qt5 this was enough, but pointerhandlers in qt6 refuse events with an undefined pointertype, so we have to explicitly set it to finger BUG:473541
This commit is contained in:
parent
36513123f3
commit
3a95c20279
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ OffscreenQuickView::OffscreenQuickView(QObject *parent, ExportMode exportMode)
|
|||
connect(d->m_renderControl.get(), &QQuickRenderControl::renderRequested, this, &OffscreenQuickView::handleRenderRequested);
|
||||
connect(d->m_renderControl.get(), &QQuickRenderControl::sceneChanged, this, &OffscreenQuickView::handleSceneChanged);
|
||||
|
||||
d->touchDevice = new QPointingDevice({}, {}, QInputDevice::DeviceType::TouchScreen, {}, QInputDevice::Capability::Position, 10, {});
|
||||
d->touchDevice = new QPointingDevice(QStringLiteral("ForwardingTouchDevice"), {}, QInputDevice::DeviceType::TouchScreen, QPointingDevice::PointerType::Finger, QInputDevice::Capability::Position, 10, {});
|
||||
}
|
||||
|
||||
OffscreenQuickView::~OffscreenQuickView()
|
||||
|
|
Loading…
Reference in a new issue