<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Disable Map's double click zoom in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7769#M37</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I'm trying to have a custom mode where double clicking on a map will do something that isn't zooming into a point, but I can't seem to disable the built in functionality to zoom in to where the user double clicked.&amp;nbsp; I'm fairly certain that just marking the event as accepted isn't going to work since the signal isn't passing a reference to the QMouseEvent, but a copy of it.&amp;nbsp; Is there some other way to disable the zoom on double click functionality?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jan 2014 17:24:17 GMT</pubDate>
    <dc:creator>EricHeine</dc:creator>
    <dc:date>2014-01-21T17:24:17Z</dc:date>
    <item>
      <title>Disable Map's double click zoom</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7769#M37</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I'm trying to have a custom mode where double clicking on a map will do something that isn't zooming into a point, but I can't seem to disable the built in functionality to zoom in to where the user double clicked.&amp;nbsp; I'm fairly certain that just marking the event as accepted isn't going to work since the signal isn't passing a reference to the QMouseEvent, but a copy of it.&amp;nbsp; Is there some other way to disable the zoom on double click functionality?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 17:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7769#M37</guid>
      <dc:creator>EricHeine</dc:creator>
      <dc:date>2014-01-21T17:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Map's double click zoom</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7770#M38</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been looking into this problem as well, and I have not found any official solution that works with the Qt sdk.&amp;nbsp; I have found solutions that supposedly work with Java and Python etc, but it doesn't seem to be something supported for Qt.&amp;nbsp; However, I have stumbled onto a solution that is somewhat of a hack.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Within the double click event handler, if you retrieve the current zoom scale and then apply a zoomToScale to it, it will override whatever active zooming was applied by the default double click handler and basically disable the zoom animation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;connect(&amp;amp;map, SIGNAL(mouseDoubleClick(QMouseEvent)), this, SLOT(onMouseDoubleClick(QMouseEvent)));

void onMouseDoubleClick(QMouseEvent event)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; double scale = map.scale();
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.zoomToScale(scale);
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone has a better solution, please share.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:19:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7770#M38</guid>
      <dc:creator>JeffHoude</dc:creator>
      <dc:date>2021-12-10T20:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Map's double click zoom</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7771#M39</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To handle interception of the mouseDoubleClick event on the GraphicsScene, you must subclass QGraphicsItem, accept mouseDoubleClick, and add this item to the GraphicsScene (MapGraphicsView::scene()).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a few examples in the QtSampleApplication sample code, which comes installed the Runtime SDK for Qt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See the Search --&amp;gt; Local Geocode sample for information on how to intercept double click events from the Map's scene.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 17:07:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/disable-map-s-double-click-zoom/m-p/7771#M39</guid>
      <dc:creator>MichaelTims</dc:creator>
      <dc:date>2014-01-29T17:07:41Z</dc:date>
    </item>
  </channel>
</rss>

