[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Issue with QDialog and lifetime
From:       "Giovanni Bajo" <rasky () develer ! com>
Date:       2005-06-23 7:19:19
Message-ID: 004001c577c3$e0e577b0$fb4a2597 () bagio
[Download RAW message or body]

James Emerton <ephelon@gmail.com> wrote:

> Sorry to be digging up such an old thread, but my mind keeps coming
> back to this one.

Yeah, me too... I still have not conceived an elegant solution for this
problem. BTW, I also found out that this:

dlg = MyDialog(self):
try:
    dlg.exec_loop()
finally:
    dlg.deleteLater()

is not correct because there will be a leak in case MyDialog's constructor
throws an exception (after having called the C++ constructor, and so having
connected the instance to the parent).

> Does anyone see a potential problem with exec_loop() transferring
> ownership of the dialog instance back to Python?

Well, which C++ API would you intend to call to achieve this? We still need the
QDialog to keep its parent widget because it is the widget on which the dialog
is modal.

Giovanni Bajo

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic