QObjectPicker works on Linux, does not work on Windows
-
I have the same code running on two different devices. One runs Ubuntu 22.04, the other runs Windows 10. I have a set of entities loaded into a scene within a Qt3DWindow which has been containerized as a widget within a larger UI. On Linux, when I click on an object, the signal for the QObjectPicker is received and forwarded properly. On Windows, I do not get the same signal.
To elaborate on this: I have many entities which are created in a scene. Each entity has to it a QObjectPicker. This is all done by-the-books, so to speak, based on examples provided by Qt.
The main Qt3D window is made into a Widget via the
createWindowContainer
function. This allows the Qt3D system to be passed around as a standard widget, which is the desired functionality given that everything is being done in C++ and there is no QML being loaded. Additionally, I am not messing with the QObjectPicker settings, nor am I changing the defaults in the singletonrenderSettings()->pickerSettings()
. This seems to work pretty seamlessly on Linux, that is when I click the object the proper signal is fired throughout the system. On Windows, nothing happens.Looking more closely into this issue, there was a place on StackOverflow where someone mentioned that the ingestion of a mouse event differs between the two operating systems on this exact issue, however nothing allows the Windows version to work despite the numerous different solutions I tried.
Any ideas would be greatly appreciated.
-
Hi,
Which version of Qt are you using ?
Can you provide a minimal compilable example that reproduces your issue ?