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.
This code
QObject::connect(view, &MapQuickView::mousePressed, this, [](const auto& mouseEvent) {
qDebug() << "mousePressed:" << mouseEvent.button();
});
QObject::connect(view, &MapQuickView::mouseReleased, this, [](const auto& mouseEvent) {
qDebug() << "mouseReleased:" << mouseEvent.button();
});
QObject::connect(view, &MapQuickView::mousePressedAndHeld, this, [](const auto& mouseEvent) {
qDebug() << "mousePressedAndHeld:" << mouseEvent.button();
});
prints the following lines when clicking Qt::RightButton and Qt::MiddleButton
mousePressed: Qt::RightButton
mousePressedAndHeld: Qt::LeftButton
mouseReleased: Qt::RightButton
mousePressed: Qt::MiddleButton
mousePressedAndHeld: Qt::LeftButton
mouseReleased: Qt::MiddleButton
So no matter which button is actually pressed and held, the event always only contains the Qt::LeftButton.
We are using the 200.4 release of ArcGIS Maps SDK for Qt.
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.