[vtkusers] Problem with checkerWidget in VTK+QT

Eric E. Monson emonson at cs.duke.edu
Tue Aug 10 11:22:42 EDT 2010


Yup, I think David is right. I was able to get the widget and handles to stay around by making the widget a member variable of the window (Qt) class.

-Eric

On Aug 10, 2010, at 11:07 AM, David Doria wrote:

> On Tue, Aug 10, 2010 at 11:02 AM, Jothy <jothybasu at gmail.com> wrote:
>> Thanks Eric,
>> 
>> It fixed part of the problem!
>> 
>> Now, it doesn't throw the error, but the checkerWidget handles disappear as
>> soon as I click in the render window.
>> 
>> Jothy
> 
> I had a problem like this once. I had to move the declaration of the
> vtk object (in this case the vtkCheckerboardWidget) to be a member of
> the Qt class. The problem was that the smart pointer was being deleted
> after the init function was exited.
> 
> I'm not sure if this is the same in your case because I couldn't tell
> where that code you posted was living. If it doesn't work, maybe you
> can post your actual files (or the smallest version of them that you
> can create to duplicate the problem).
> 
> Thanks,
> 
> David




More information about the vtkusers mailing list