mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:37:27 +02:00
Hide the selection cursor (android only)
This commit is contained in:
parent
efba05b9a0
commit
1dfdc0ce1b
1 changed files with 8 additions and 1 deletions
|
@ -1157,7 +1157,14 @@ bool OffscreenQmlSurface::eventFilter(QObject* originalDestination, QEvent* even
|
||||||
if (_quickWindow && _quickWindow->activeFocusItem()) {
|
if (_quickWindow && _quickWindow->activeFocusItem()) {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
if (QCoreApplication::sendEvent(_quickWindow->activeFocusItem(), event)) {
|
if (QCoreApplication::sendEvent(_quickWindow->activeFocusItem(), event)) {
|
||||||
return event->isAccepted();
|
bool eventAccepted = event->isAccepted();
|
||||||
|
QInputMethodQueryEvent* imqEvent = static_cast<QInputMethodQueryEvent*>(event);
|
||||||
|
// this block disables the selection cursor in android which appears in
|
||||||
|
// the top-left corner of the screen
|
||||||
|
if (imqEvent->queries() & Qt::ImEnabled) {
|
||||||
|
imqEvent->setValue(Qt::ImEnabled, QVariant(false));
|
||||||
|
}
|
||||||
|
return eventAccepted;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue