[PyQt] centrawidget and mainwindow
mrch81 at gmail.com
Thu Jan 21 13:53:36 GMT 2010
Yes, I had exactly same error.
"underliying C/C++ object has been deleted"
And I think after explanation from David, I will try stackedwidget.
Thanks both of you,
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:
> If you want to use multiple reusable widgets, put them in a QStackedWidget
> and set that as the central widget.
> PyQt mailing list PyQt at riverbankcomputing.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt