Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.5
-
None
Description
If Map item contains sub-child elements dragging them or selecting content by mouse in TextEdit causes Map content to move (map panning). Code example:
import QtQuick 2.12 import QtQuick.Controls 2.12 import QtLocation 5.12 import QtPositioning 5.12 ApplicationWindow { Map { Rectangle { ListView { } Slider { } Button { } TextEdit { } } } }
Reproducible with any control: ListView delegate, TextEdit, Button, etc. If I move Rectangle outside the Map element (make its sibling), then I can solve the problem by adding MouseArea to the Rectangle like this:
MouseArea { preventStealing:true propagateComposedEvents: true hoverEnabled: true onWheel: { wheel.accepted = true; } onPressed: { mouse.accepted = true; } onReleased: { mouse.accepted = true; } onPressAndHold: { mouse.accepted = true; } }
which prevents mouse events propagation to the Map, so Map does not move, pan unintentionally any more: https://stackoverflow.com/a/58978749/630169
It it bug or expected behavior so I can't place items inside Map element as it catches their mouse events and starts to pan, zoom unintentionally?