Right Mouse Button is not detected
Unsolved
Qt for WebAssembly
-
Below is QML code containing a MouseArea and some Texts that show if LeftButton and/or RightButton are pressed.
On Desktop, everything works as expected. But when compiled for WebAssembly, only LeftButton press is registered.
RightButton is not detected, even if Left is also pressed down. MiddleButton doesn't seem to work as well.Tested on Firefox and Chrome.
The project is built using QtCreator with generated by default main.cpp and CMakeLists.txt.
Versions used: Qt 6.2.1, Emscripten 2.0.14.import QtQuick import QtQuick.Window Window { width: 640 height: 480 visible: true MouseArea { anchors.fill: parent acceptedButtons: Qt.AllButtons Text { id: text_left anchors.centerIn: parent font.pixelSize: 28 text: "Left button: " + ((parent.pressedButtons & Qt.LeftButton) ? "pressed" : "not pressed") } Text { id: text_right anchors.top: text_left.bottom anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 28 text: "Right button: " + ((parent.pressedButtons & Qt.RightButton) ? "pressed" : "not pressed") } } }
-
+1 for this issue, a real show-stopper for our project.
-
Thanks for this. Although the proper place for bug reports is at https://bugreports.qt.io
I have made one for you:
https://bugreports.qt.io/browse/QTBUG-99474 -
This is already fixed in 6.2.3, and 6.3