Yes, I had exactly same error. <br><br>RuntimeError<br>
"underliying C/C++ object has been deleted"<br>
<br>And I think after explanation from David, I will try stackedwidget.<br><br>Thanks both of you,<br>Mrugesh.<br><br><div class="gmail_quote">2010/1/21 David Boddie <span dir="ltr"><<a href="mailto:david@boddie.org.uk">david@boddie.org.uk</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Wed, 20 Jan 2010 10:46:10 -0800, Jamie Riotto wrote:<br>
<br>
> When I run this, it correctly sets Text Edit #1 as Central Widget.<br>
> Pressing "Editor-2" button correctly changes the Central<br>
> Widget to Text Edit #2, however, when I press "Editor-1" button to<br>
> restore Text Edit #1 to Central Widget I get:<br>
><br>
> RuntimeError<br>
> "underliying C/C++ object has been deleted"<br>
><br>
> Any clues as to what I'm doing wrong??? Thanks - jamie<br>
<br>
</div>Qt deletes the existing central widget behind the scenes when you set a<br>
new one:<br>
<br>
<a href="http://qt.nokia.com/doc/4.6/qmainwindow.html#setCentralWidget" target="_blank">http://qt.nokia.com/doc/4.6/qmainwindow.html#setCentralWidget</a><br>
<br>
If you want to use multiple reusable widgets, put them in a QStackedWidget<br>
and set that as the central widget.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
</div></div></blockquote></div><br>