[vtkusers] QVTKRenderWindowInteractor Issue

Ben Medina ben.medina at gmail.com
Sun Mar 20 17:47:36 EDT 2011


What issues are you seeing with QMdiArea? I've done this in an app,
and it worked fine, at least on Windows and Linux. On Mac, there are
unfortunate rendering issues.

On Mon, Feb 28, 2011 at 5:09 AM, JBK <juk124 at psu.edu> wrote:
> Hi,
>
> I am developing visualization software that uses Qt and VTK.  I am creating
> a QVTKRenderWindowInteractor and adding this to a QWorkspace as the central
> widget of the application window.  Just as a note, I realize that QWorkspace
> is technically deprecated, but it's replacement QMdiArea does not seem to be
> able to handle a VTK render window as its widget.  Anyway, the QWorkspace
> seems to be working just fine except for one annoying issue/bug.
>  Interaction that occurs within the render window seems to be shifted by
> about 35 pixels in the -y direction.  In other words, a mouse click is
> detected 35 pixels higher on the screen than where the glyph I am trying to
> pick is located.  The reason I know this is because I have added in a
> correction factor that shifts the mouse event by 35 pixels along the y axis
> and the pick event is then positioned correctly.
>
> I have narrowed this issue down to possibly an issue with Qt's layout
> manager.  In other words, if I just create the render window and don't add
> it to a layout manager (just give it a parent window), the interaction seems
> to be correct.  However, when I add it to a layout manager so that it is
> resized according to its parent widget - which is what I need to happen -
> the 35 pixel interaction shift occurs.
>
> Has anyone run into this issue or does anyone have any ideas for some
> creative fixes?  I need to fix this so that I can using other VTK widgets
> that require interaction such as the box probe.
>
> Thanks,
> Josh
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list