# Mouse position qt vtk 9.3

**URL:** https://discourse.vtk.org/t/mouse-position-qt-vtk-9-3/13260
**Category:** Support
**Created:** [February 5, 2024, 2:48pm UTC](https://discourse.vtk.org/t/mouse-position-qt-vtk-9-3/13260 "2024-02-05T14:48:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Tobias-Med](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/a9adbd/32.png) [@Tobias-Med](https://discourse.vtk.org/u/Tobias-Med)
#### Post date: [February 5, 2024, 2:48pm UTC](https://discourse.vtk.org/t/mouse-position-qt-vtk-9-3/13260/1 "2024-02-05T14:48:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![chloe](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/839c29/32.png) [@chloe](https://discourse.vtk.org/u/chloe)
#### Post date: [March 22, 2024, 3:20am UTC](https://discourse.vtk.org/t/mouse-position-qt-vtk-9-3/13260/2 "2024-03-22T03:20:36Z")

</div>

Is there a solution? I had the same problem

---

<div class="post-metadata">

### Author: ![a-ciue](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a-ciue/32/9590_2.png) [@a-ciue](https://discourse.vtk.org/u/a-ciue)
#### Post date: [December 9, 2024, 12:21pm UTC](https://discourse.vtk.org/t/mouse-position-qt-vtk-9-3/13260/3 "2024-12-09T12:21:01Z")

</div>

I had the same issue when using vtk9.3.1. Now I update vtk to version 9.4.0, and this issue is solved.
