On Wed, 13 Oct 2010 15:44:58 +0200, "Hans-Peter Jansen" <[email protected]>
wrote:
> Hi Phil,
> 
> while looking at dynamic resizing widgets on irc, David Boddie created a

> small script, that I improved a little bit, which shows a small bug 
> with mdi windows. According to the doc of QMdiArea::addSubWindow, 
> closing windows should stay hidden, but if you close the mdi window, 
> and adds another button, it tracebacks with:
> 
> Traceback (most recent call last):
>   File "dynresize.py", line 29, in addRow
>     if self.subwindow.isHidden():
> RuntimeError: underlying C/C++ object has been deleted

The docs say that a closed window will be hidden if you are passing your
own QMdiSubWindow. It isn't really clear about what happens when you pass a
QWidget. If you look at the C++ implementation of addSubWindow() you see
that it is setting WA_DeleteOnClose in this case. So I think the current
behaviour is correct.

Phil
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to