<div dir="ltr">I was trying to get a vtkBorderWidget example working:<div><br></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ImageClip" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ImageClip</a></div>
<div><br></div><div>The example works fine in VTK, however when I wanted to use QVTKWidget in Qt the vtkBorderWidget instant never appeared; A month ago, I had the same issue when I wanted to use vtkSeedWidget. </div><div>
<br></div><div>After a lot of hours and several cups of coffee :), I came across 2-3 online posts such as this one:</div><div><br></div><div><a href="http://vtk.1045678.n5.nabble.com/Using-VTK-widgets-in-Qt-renderers-tt1250231.html#none" target="_blank">http://vtk.1045678.n5.nabble.com/Using-VTK-widgets-in-Qt-renderers-tt1250231.html#none</a></div>
<div><br></div><div>and found out the problem is trivial, and it is only because the object goes out of scope and hence vtkSmartPointer destroys it. One solution, for me, was not-to-use vtkSmartPointer in this case, and remember to delete the pointer in the end.</div>
<div><br></div><div>Just wanted to write this email for other people in future. Correct me if I am mistaking in the above explanations. Maybe there is a better solution too.</div><div><br></div><div>-Sam</div></div>