[vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode
Sean McBride
sean at rogue-research.com
Fri Sep 2 15:44:48 EDT 2016
On Fri, 2 Sep 2016 19:18:51 +0000, Hongzhi Lan said:
>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?
Can you try with this patch?
<https://gitlab.kitware.com/vtk/vtk/merge_requests/1797>
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers
mailing list