Mouse position qt vtk 9.3

Hello together,

I am using vtk (9.3) with qt (6.5.3) using the QQuickVTKItem class. The problem I am facing is that mouse positions do not seem to be translated from qml to vtk correctly. For testing purpose I used the “Examples/GUI/QML/QtQuickBoxWidget” to reproduce the error. I found out that the problem has to do with the device pixel ratio. For some reason the pixel ratio of QVTKInteractorAdapter inside the QQuickVTKItem is not set. I was also able to create a .patch file to fix the issue myself.

The device I tested this runs on linux (ubuntu 20) which per default has a devicePixelRatio of 1.25.
I could not find any open issue for this so I assumed it could be a issue of the environment I am using.

Could someone reproduce this? The only thing to do is building the QtQuickBoxWidget example and check if the mouse position corresponds to the clicked handle. Also I do not think this could be reproduced if DPR is set to 1.0.

Thanks,
Tobias

1 Like

Is there a solution? I had the same problem