Hello,<div><br></div><div>I'm looking for a way to change a widget's type dynamically.</div><div>So, for example, I have : </div><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">self.filetable = QTableView()</font></div>

<div><br></div><div>and during the execution, I would like to change it to a <font class="Apple-style-span" face="'courier new', monospace">QTreeView</font>(). How should I do to do something like : </div><div><br>

</div><div><font class="Apple-style-span" face="'courier new', monospace">self.filetable = QTableView()</font></div><div><font class="Apple-style-span" face="'courier new', monospace">(...)</font></div><div>

<font class="Apple-style-span" face="'courier new', monospace">if aVar == 3:</font></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><font class="Apple-style-span" face="'courier new', monospace">self.filetable = QTreeView()</font></div>

<div><font class="Apple-style-span" face="'courier new', monospace">self.filetable.updateUI()</font></div><div><br></div><div><br></div></blockquote>Where my hypothetic <font class="Apple-style-span" face="'courier new', monospace">updateUI</font>() function would redraw a new <font class="Apple-style-span" face="'courier new', monospace">QTreeView</font> on my screen's application.<div>

Any pointer to a documentation's url is welcome :-)</div><div><br></div><div>Thank you,</div><div>Gaëtan</div>