[vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode

Hongzhi Lan hongzhi at stanford.edu
Fri Sep 2 15:18:51 EDT 2016


Hi all,


I recently tested the example RenderWindowNoUiFile from VTK in Mac ,and found the renderwindow only occupies the left-bottom quarter of the QVTKWidget (shown in the attached image). I know someone mentioned this issue and you can avoid it by using "Open in Low Resolution". But with a very good high(retina) resolution mac computer, you can only open a Qt-vtk-dependent application in "Low Resolution" and get a blurry GUI, which seems not ok to users who are using high resolution mac computer.  I was wondering if vtk developers will fix this issue in the nearest future.


By doing some web search, I know the reason is: In Hidpi (such as retina resolution in macbook pro), 1x1 pixel becomes 2x2 pixels. Qt can recognize it, so the widget size is right, but vtk can't, so vtkRenderWindow only occupies a quarter of the widget size. I tried to modify the source code of QVTKWidget class by doubling the size of vtkRenderingWindow in the QVTKWidget, but it did't change anything. So it's not so straightforward as I expected.  Can anyone give me some suggestion about how to fix the issue and what classes I need to modify?


Thanks a lot!

Hongzhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160902/12f413bd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example2.png
Type: image/png
Size: 30395 bytes
Desc: example2.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160902/12f413bd/attachment.png>


More information about the vtkusers mailing list