When running the application on a high DPI display using the Qt system-variable QT_DEVICE_PIXEL_RATIO there are two issues right now:
- Qt based overlays are not correctly rendered
When changing the text of an overlay the 'old' value is still visible because the new value is somehow just painted above the old one without correctly clearing it.
Origin of the issue:
There is a bug in Qt that causes the repainting to be messed up when the QT_DEVICE_PIXEL_RATIO!=1 and a widget has the attribute 'translucent-background' as the widget containing the overlays has.
Solution:
Use a custom widget as container that overrides the paintEvent of the widget and fix the painting issue. (Solution from Qt-Forum)
- vtk based overlays are not correctly positioned when rendering PlanarFigures
The variable QT_DEVICE_PIXEL_RATIO changes the scaling of the Qt rendering. This change in scale is not considered in the positioning of the vtk based overlays.
Thus the overlays are not rendered where they're supposed to be.
Origin of the issue:
QVTKWidget does not consider the QT_DEVICE_PIXEL_RATIO -> Positioning is incorrect.
Solution:
Manually fix the position of the overlays in the mitkPlanarFigureMapper2D