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

Elvis Stansvik elvstone at gmail.com
Thu Feb 25 08:05:58 CET 2021


Den ons 24 feb. 2021 17:09Alexander Dyagilev <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
>
> 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
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210225/991bbe6d/attachment-0001.html>


More information about the Interest mailing list