<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Qt Quick: How to handle hover-type events in MouseArea, yet let lower-z MouseAreas handle them too?]]></title><description><![CDATA[<p dir="auto">If, on my MouseArea, I've enabled the property <code>hoverEnabled</code>, I'm notified of the <code>entered</code> signal, even if no mouse button is held at that time (just as I want).</p>
<p dir="auto">But then a lower-z MouseArea will not receive positionChanged events on the first MouseArea's space, since they're eaten up by the first MouseArea.</p>
<p dir="auto"><a href="http://doc.qt.io/qt-5/qml-qtquick-mousearea.html#positionChanged-signal" target="_blank" rel="noopener noreferrer nofollow ugc">The Qt docs on <code>positionChanged</code></a> specifically say this:</p>
<blockquote>
<p dir="auto">When handling this signal, changing the accepted property of the mouse parameter has no effect.</p>
</blockquote>
<p dir="auto">Example code:</p>
<pre><code>Item {
	width: 100
	height: 100
	
	MouseArea {
		anchors.fill: parent
		hoverEnabled: true
		
		onPositionChanged: {
			console.log("MouseArea 1");
		}
	}
	
	MouseArea {
		anchors.fill: parent
		hoverEnabled: true
		
		onEntered: {
			console.log("MouseArea 2");
		}
	}
}
</code></pre>
<p dir="auto">"MouseArea 1" is never printed. I want both strings to be printed.</p>
<p dir="auto"><strong>Is there a way to do it?</strong></p>
<p dir="auto"><em>Related question note:</em> <a href="http://stackoverflow.com/questions/31666001/how-to-make-double-mousearea-take-effect" target="_blank" rel="noopener noreferrer nofollow ugc">This question</a> is very similar but the asker there has 2 differently-sized overlapping <code>MouseArea</code>s, and he wants the smaller one (which is has higher z) to eat up events when the events fall within both. I want both overlapping <code>MouseArea</code>s to handle events that fall within both.</p>
]]></description><link>https://forum.qt.io/topic/73254/qt-quick-how-to-handle-hover-type-events-in-mousearea-yet-let-lower-z-mouseareas-handle-them-too</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Nov 2026 07:27:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/73254.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Nov 2016 17:15:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qt Quick: How to handle hover-type events in MouseArea, yet let lower-z MouseAreas handle them too? on Sun, 10 Mar 2024 14:20:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stefan-monov76">@<bdi>Stefan-Monov76</bdi></a> Have you found the answer?</p>
]]></description><link>https://forum.qt.io/post/792718</link><guid isPermaLink="true">https://forum.qt.io/post/792718</guid><dc:creator><![CDATA[AliGh]]></dc:creator><pubDate>Sun, 10 Mar 2024 14:20:03 GMT</pubDate></item><item><title><![CDATA[Reply to Qt Quick: How to handle hover-type events in MouseArea, yet let lower-z MouseAreas handle them too? on Mon, 08 May 2017 11:03:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jalomic">@<bdi>jalomic</bdi></a>: No, sorry, I haven't.</p>
]]></description><link>https://forum.qt.io/post/392324</link><guid isPermaLink="true">https://forum.qt.io/post/392324</guid><dc:creator><![CDATA[Stefan Monov76]]></dc:creator><pubDate>Mon, 08 May 2017 11:03:05 GMT</pubDate></item><item><title><![CDATA[Reply to Qt Quick: How to handle hover-type events in MouseArea, yet let lower-z MouseAreas handle them too? on Sun, 07 May 2017 19:09:15 GMT]]></title><description><![CDATA[<p dir="auto">Have you found the answer?</p>
]]></description><link>https://forum.qt.io/post/392203</link><guid isPermaLink="true">https://forum.qt.io/post/392203</guid><dc:creator><![CDATA[jalomic]]></dc:creator><pubDate>Sun, 07 May 2017 19:09:15 GMT</pubDate></item></channel></rss>