[Interest] QML MouseArea containsMouse is set to true even if it's not actually

Alexander Dyagilev alervdvcw at gmail.com
Mon Mar 1 11:39:04 CET 2021


Hello,

Unfortunately, HoverHandler is buggy too...

I've created the bug report here:
https://bugreports.qt.io/browse/QTBUG-91450


On 2/25/2021 10:05 AM, Elvis Stansvik wrote:
> Den ons 24 feb. 2021 17:09Alexander Dyagilev <alervdvcw at gmail.com 
> <mailto:alervdvcw at gmail.com>> skrev:
>
>     It seems that HoverHandler is not affected by this bug:
>     https://doc.qt.io/qt-5.12/qml-qtquick-hoverhandler.html
>     <https://doc.qt.io/qt-5.12/qml-qtquick-hoverhandler.html>
>
>     I've switched to it - the problem is not happening anymore.
>
>
> Glad it worked out, but if you think there is a bug in MouseArea, 
> please report it on the bugtracker with a minimal testcase included.
>
> Elvis
>
>     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?
>>
>     _______________________________________________
>     Interest mailing list
>     Interest at qt-project.org <mailto:Interest at qt-project.org>
>     https://lists.qt-project.org/listinfo/interest
>     <https://lists.qt-project.org/listinfo/interest>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210301/8cff75c2/attachment.html>


More information about the Interest mailing list