[PyQt] centrawidget and mainwindow
M Chauhan
mrch81 at gmail.com
Thu Jan 21 13:53:36 GMT 2010
Yes, I had exactly same error.
RuntimeError
"underliying C/C++ object has been deleted"
And I think after explanation from David, I will try stackedwidget.
Thanks both of you,
Mrugesh.
2010/1/21 David Boddie <david at boddie.org.uk>
> On Wed, 20 Jan 2010 10:46:10 -0800, Jamie Riotto wrote:
>
> > When I run this, it correctly sets Text Edit #1 as Central Widget.
> > Pressing "Editor-2" button correctly changes the Central
> > Widget to Text Edit #2, however, when I press "Editor-1" button to
> > restore Text Edit #1 to Central Widget I get:
> >
> > RuntimeError
> > "underliying C/C++ object has been deleted"
> >
> > Any clues as to what I'm doing wrong??? Thanks - jamie
>
> Qt deletes the existing central widget behind the scenes when you set a
> new one:
>
> http://qt.nokia.com/doc/4.6/qmainwindow.html#setCentralWidget
>
> If you want to use multiple reusable widgets, put them in a QStackedWidget
> and set that as the central widget.
>
> David
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100121/84ee52f9/attachment.html>
More information about the PyQt
mailing list