[vtkusers] VTK+Qt+Linux Opens Two OpenGL Windows

Jim Pelton jimpelton at u.boisestate.edu
Thu Nov 24 15:59:31 EST 2011


Thanks David, your suggestion gave me a place to start looking and I 
solved the problem.

I wasn't explicitly calling renderWindowInteractor->Start(), but I was 
creating an extra vtkRenderWindowInteractor and associating it with the 
existing vtkRenderWindow, and then adding that renderWindow to the 
QVTKWidget.

Now that I have removed the line that adds the render window to that 
extra interactor the extra window no longer appears. I'll take a look at 
the vtk source so  that I can understand what is happening a little better.

Thanks again,
Jim

On 11/24/2011 01:03 PM, David Doria wrote:
> On Thu, Nov 24, 2011 at 2:57 PM, Jim Pelton<jimpelton at u.boisestate.edu>  wrote:
>> Hello all, I've googled around but haven't found the magic combo to locate
>> the answer to this question.
>>
>> I'm writing a VTK+Qt application using QVTKWidget. When I start the
>> application in linux (fedora 15) two windows open up, both the same size.
>> This only happens in Linux, but not win 7.
>>
>> One is totally blank and titled "Visualization Toolkit - OpenGL." The other
>> is the actual application window with the Qt widgets (including the
>> QVTKWidget) in it. This window works fine.
>>
>> So, I'd like to get rid of this second window. I'm actually not sure where
>> to begin as I'm pretty new to VTK, so any pointers or hints would be greatly
>> appreciated. I'm not even sure which part of the code I could post!
>>
>>
>> Thanks,
>> Jim
> It sounds to me like you started the VTK event loop (with
> renderWindowInteractor->Start();). There is no need to do this if you
> are using a QVTK widget from a Qt widget.
>
> Let us know if that was the case.
>
> David




More information about the vtkusers mailing list