<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    <div class="moz-forward-container"> I am having really hard times
      passing on reference to the objects that are stored as
      vtkSmartPointer&lt;T&gt; as private data within a class. E.g.:<br>
      <tt>class MyClass </tt><tt><br>
      </tt><tt>{</tt><tt><br>
      </tt><tt>&nbsp; public:</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; ...</tt><tt><br>
      </tt><tt>&nbsp;&nbsp; private:</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkPolyData&gt; surface;</tt><tt><br>
      </tt><tt>};</tt><tt><br>
      </tt><br>
      What is the best way to pass 'surface' via signal/slot mechanism
      of Qt? <br>
      I thought I'd create a public method<br>
      <tt>vtkPolyData * MyClass::getSurface() { return
        surface.GetPointer(); }</tt><br>
      The problem is that GetPointer() returns <b>const</b> T* which
      the compiler complains about when I later want to use it. As a
      matter of fact, all vtkSmartPointer's public methods return const
      something. <br>
      <br>
      What would be the preferred way to pass objects stored as
      vtkSmartPointer&lt;T&gt; object?<br>
      1.) T* MyClass::getT() const { return object.GetPointer(); }<br>
      2.) vtkSmartPointer&lt;T&gt; MyClass::getT() { return object; }<br>
      3.) something else?<br>
      <br>
      I want to pass the object via signal/slot mechanism. What would be
      the best way?<br>
      A.) signal doneSurfaceProcessing(vtkPolyData &amp;);&nbsp; <br>
      B.) signal doneSurfaceProcessing(vtkPolyData *);<br>
      C.) signal
      doneSurfaceProcessing(vtkSmartPointer&lt;vtkPolyData&gt;);<br>
      <br>
      Thank you!!<br>
      Miro<br>
      <br>
    </div>
    <br>
  </body>
</html>