[Interest] QML MouseArea containsMouse is set to true even if it's not actually
Alexander Dyagilev
alervdvcw at gmail.com
Wed Feb 24 17:07:58 CET 2021
It seems that HoverHandler is not affected by this bug:
https://doc.qt.io/qt-5.12/qml-qtquick-hoverhandler.html
I've switched to it - the problem is not happening anymore.
On 2/15/2021 8:14 PM, Alexander Dyagilev wrote:
>
> Hello,
>
> In our code we have one MouseArea which fills entire parent:
>
> MouseArea{
> id:mouseAreaRow
> hoverEnabled:true
> anchors.fill:parent
> propagateComposedEvents:true
> onPressed:{mouse.accepted=false}
> }
>
> And we have another MouseArea which fills a small part of the same
> area which the first MouseArea fills:
>
> MouseArea{
>
> id:mouseAreaUp
> hoverEnabled:true
> anchors.fill:parent
> cursorShape:Qt.PointingHandCursor
> }
>
> The problem is that sometimes mouseAreaUp.containsMouse continues to
> be set to true even after the mouse left its area. Most of the time it
> happens when the mouse pointer is moved very fast.
>
> Is this a known issue or maybe some misunderstanding on our side?
>
> Is there any workaround? Is it possible to at least force MouseArea to
> recheck if it really contains the mouse pointer?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210224/b8644b7e/attachment.html>
More information about the Interest
mailing list