[vtk-developers] QVTKwidget interaction problem

David Doria daviddoria at gmail.com
Mon Mar 5 13:30:58 EST 2012


On Mon, Mar 5, 2012 at 8:01 AM, Carlos Delgado
<carlos.m.delgado at gmail.com> wrote:
> Hi all:
>
> I have designed a Qt GUI with a VTK window inside. I have written a
> callback for the RenderWindowInteractor, but when the window renders,
> the interactor does not seem to work.
> It works if the order  "widget.show()"  is executed before
> "application.exec()", but not after this last one. Could anyone help
> me?
>
> Thanks so much in advance.
>
> Regards,
> Carlos Delgado.

When you call application.exec() Qt takes control (the main Qt event
loop starts). This should certainly be the last line of your program.
Have you seen this example?
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUIMultipleInheritance

Also, this type of question should be sent to the VTK users list,
rather than the developers list.

David



More information about the vtk-developers mailing list