title: Polymorphic QSharedPointer
body: <p>I'm trying to use <code>QSharedPointer</code> in my polymorphic stucture, but I couldn't find right syntax to convert pointer of base class to pointer of derived class.</p>
  
  <pre><code>struct Switch : State {
   int a;
  };
  
  QSharedPointer &lt;State&gt; myState=QSharedPointer &lt;State&gt;(new Switch);  
  
  QSharedPointer &lt;Switch&gt; mySwitchTest= ??? myState;
  </code></pre>
  
  <p>What should I put in the place of ???</p>