<?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 Bug: MapQuickView / SceneQuickView mousePressedAndHeld always sends Qt::LeftButton even if Qt::RightButton is held in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/bug-mapquickview-scenequickview/m-p/1420389#M5217</link>
    <description>&lt;P&gt;When connecting to a MapQuickView / SceneQuickView mousePressedAndHeld signal the QMouseEvent's button() property is always Qt::LeftButton, even though the held down button might be a different one.&lt;/P&gt;&lt;P&gt;This code&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;QObject::connect(view, &amp;amp;MapQuickView::mousePressed, this, [](const auto&amp;amp; mouseEvent) {
	qDebug() &amp;lt;&amp;lt; "mousePressed:" &amp;lt;&amp;lt; mouseEvent.button();
});
QObject::connect(view, &amp;amp;MapQuickView::mouseReleased, this, [](const auto&amp;amp; mouseEvent) {
	qDebug() &amp;lt;&amp;lt; "mouseReleased:" &amp;lt;&amp;lt; mouseEvent.button();
});
QObject::connect(view, &amp;amp;MapQuickView::mousePressedAndHeld, this, [](const auto&amp;amp; mouseEvent) {
	qDebug() &amp;lt;&amp;lt; "mousePressedAndHeld:" &amp;lt;&amp;lt; mouseEvent.button();
});&lt;/LI-CODE&gt;&lt;P&gt;prints the following lines when clicking Qt::RightButton and Qt::MiddleButton&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mousePressed: Qt::RightButton
mousePressedAndHeld: Qt::LeftButton
mouseReleased: Qt::RightButton
mousePressed: Qt::MiddleButton
mousePressedAndHeld: Qt::LeftButton
mouseReleased: Qt::MiddleButton&lt;/LI-CODE&gt;&lt;P&gt;So no matter which button is actually pressed and held, the event always only contains the Qt::LeftButton.&lt;/P&gt;&lt;P&gt;We are using the&amp;nbsp;&lt;SPAN&gt;200.4 release of ArcGIS Maps SDK for Qt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This looks like a bug to me, or are we misunderstanding mousePressedAndHeld? With this implementation we won't be able to differentiate between different buttons being pressed and held.&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2024 13:41:06 GMT</pubDate>
    <dc:creator>imbachb</dc:creator>
    <dc:date>2024-05-08T13:41:06Z</dc:date>
    <item>
      <title>Bug: MapQuickView / SceneQuickView mousePressedAndHeld always sends Qt::LeftButton even if Qt::RightButton is held</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/bug-mapquickview-scenequickview/m-p/1420389#M5217</link>
      <description>&lt;P&gt;When connecting to a MapQuickView / SceneQuickView mousePressedAndHeld signal the QMouseEvent's button() property is always Qt::LeftButton, even though the held down button might be a different one.&lt;/P&gt;&lt;P&gt;This code&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;QObject::connect(view, &amp;amp;MapQuickView::mousePressed, this, [](const auto&amp;amp; mouseEvent) {
	qDebug() &amp;lt;&amp;lt; "mousePressed:" &amp;lt;&amp;lt; mouseEvent.button();
});
QObject::connect(view, &amp;amp;MapQuickView::mouseReleased, this, [](const auto&amp;amp; mouseEvent) {
	qDebug() &amp;lt;&amp;lt; "mouseReleased:" &amp;lt;&amp;lt; mouseEvent.button();
});
QObject::connect(view, &amp;amp;MapQuickView::mousePressedAndHeld, this, [](const auto&amp;amp; mouseEvent) {
	qDebug() &amp;lt;&amp;lt; "mousePressedAndHeld:" &amp;lt;&amp;lt; mouseEvent.button();
});&lt;/LI-CODE&gt;&lt;P&gt;prints the following lines when clicking Qt::RightButton and Qt::MiddleButton&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mousePressed: Qt::RightButton
mousePressedAndHeld: Qt::LeftButton
mouseReleased: Qt::RightButton
mousePressed: Qt::MiddleButton
mousePressedAndHeld: Qt::LeftButton
mouseReleased: Qt::MiddleButton&lt;/LI-CODE&gt;&lt;P&gt;So no matter which button is actually pressed and held, the event always only contains the Qt::LeftButton.&lt;/P&gt;&lt;P&gt;We are using the&amp;nbsp;&lt;SPAN&gt;200.4 release of ArcGIS Maps SDK for Qt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This looks like a bug to me, or are we misunderstanding mousePressedAndHeld? With this implementation we won't be able to differentiate between different buttons being pressed and held.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 13:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/bug-mapquickview-scenequickview/m-p/1420389#M5217</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2024-05-08T13:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bug: MapQuickView / SceneQuickView mousePressedAndHeld always sends Qt::LeftButton even if Qt::RightButton is held</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/bug-mapquickview-scenequickview/m-p/1423026#M5218</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/710993"&gt;@imbachb&lt;/a&gt;&lt;/P&gt;&lt;P&gt;You're right, this is a bug. We've logged an issue for this, thanks for pointing it out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 15:36:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/bug-mapquickview-scenequickview/m-p/1423026#M5218</guid>
      <dc:creator>bnoble0110</dc:creator>
      <dc:date>2024-05-09T15:36:15Z</dc:date>
    </item>
  </channel>
</rss>

