<?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[Mouse Event Drag Release]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">I am using MouseArea of a <strong>MapQuickItem</strong> for dragging the item.</p>
<pre><code> MouseArea{

        anchors.fill:  parent
        id: _markerMouseArea
        drag.target: parent
        drag.minimumX:  0;
        drag.minimumY:  0;
        preventStealing: true
        hoverEnabled: true
        cursorShape: Qt.OpenHandCursor
     

        acceptedButtons:  Qt.LeftButton



        onReleased: {
            console.log("Released")
            updateCoordinate()
        }



    }
</code></pre>
<p dir="auto">Many times the mouse release event is not being recognized and hence misses to call the function <strong>updateCoordinate()</strong> but the object is in the new position. What could be the issue?</p>
<p dir="auto">Also, the cursor shape does not change when the object is interacted.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.qt.io/topic/77020/mouse-event-drag-release</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 07:04:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/77020.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Mar 2017 08:50:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mouse Event Drag Release on Fri, 10 Mar 2017 08:50:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/saitej">@<bdi>saitej</bdi></a> You are welcome.</p>
]]></description><link>https://forum.qt.io/post/381196</link><guid isPermaLink="true">https://forum.qt.io/post/381196</guid><dc:creator><![CDATA[RajeeshRaveendran]]></dc:creator><pubDate>Fri, 10 Mar 2017 08:50:36 GMT</pubDate></item><item><title><![CDATA[Reply to Mouse Event Drag Release on Fri, 10 Mar 2017 07:36:18 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot man!!</p>
<p dir="auto">It seems to work better than before but I need to give it more tests.</p>
]]></description><link>https://forum.qt.io/post/381162</link><guid isPermaLink="true">https://forum.qt.io/post/381162</guid><dc:creator><![CDATA[saitej]]></dc:creator><pubDate>Fri, 10 Mar 2017 07:36:18 GMT</pubDate></item><item><title><![CDATA[Reply to Mouse Event Drag Release on Fri, 10 Mar 2017 06:01:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi Saitej,</p>
<p dir="auto">I got a similiar issue when I tried to do some thing on onReleased event of MouseArea. In my case I pressed mouse area and started doing my stuff.<br />
But in between I lost the focus from mouse area (By some other action eg:- Alt + tab key pressed) and  missed to get the onReleased event.<br />
From that I understood that OnReleased called only if I pressed/dragged and released the mouse normally without any interference like focus change by other means. So I changed my code by using onPressedChanged instead of onReleased.</p>
<p dir="auto">onReleased: { /// No guarantee to get invoked always when i released the mouse(unless it has focus)<br />
}</p>
<p dir="auto">onPressedChanged: {<br />
if(pressed) {<br />
/// Mouse is in pressed state.<br />
}<br />
else {<br />
/// Mouse released. Either by user released the mouse button or by focus change to any other control.<br />
/// Here it is ensured that release will executed.<br />
}<br />
}</p>
]]></description><link>https://forum.qt.io/post/381134</link><guid isPermaLink="true">https://forum.qt.io/post/381134</guid><dc:creator><![CDATA[RajeeshRaveendran]]></dc:creator><pubDate>Fri, 10 Mar 2017 06:01:32 GMT</pubDate></item></channel></rss>