<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Dear vtkusers,</p>
    <p>I found a solution to my problem: The problem is obviously caused
      by python's garbageĀ  collector. If I assign the vtkLineWidget2 to
      an instance variable of the class MainWindow, it works as
      expected. The same issue happens with other vtkWidgets, too.</p>
    <p>I am interested to understand, why this actually happens. It is
      not a problem for the vtkActor but only for the vtk...Widget.
      Something must be fundamentally different between those classes
      which causes that the vtk...Widget is garbage-collected although
      it is still needed by vtk.</p>
    <p>Best regards,<br>
      Oliver<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Am 15.12.2017 um 12:02 schrieb Oliver
      Natt:<br>
    </div>
    <blockquote type="cite"
      cite="mid:21548920-7298-3c07-5950-445e6057e8eb@gmx.de">Dear
      vtkusers,
      <br>
      <br>
      for some reason, I cannot manage to get a vtkLineWidget2 working
      in one of my PyQt-applications. Interestingly, the same code works
      well in a regular vtk-window. Please find attaced two python
      scripts. The first script "linewidget2_noQt.py" works exactly as
      expected: A yellow cylinder and the line widget is rendered. I can
      also interact with the widget by dragging the endpoints with the
      mouse. However, the same code embedded into a Qt-Window (cf.
      linewidget2_qt.py) does not work: The yellow cylinder is shown,
      but the line widget is missing.
      <br>
      <br>
      Do you have any suggestions how to get the vtkLineWidget2 working
      in a PyQt-application?
      <br>
      <br>
      Best regards,
      <br>
      Oliver
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>

Search the list archives at: <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="https://vtk.org/mailman/listinfo/vtkusers">https://vtk.org/mailman/listinfo/vtkusers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>