[PyKDE] Issue with QDialog and lifetime

Giovanni Bajo rasky at develer.com
Wed Jul 6 16:32:54 BST 2005

James Emerton <ephelon at gmail.com> wrote:

>>> 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.
> [...]
> You should be able to test this with sip.transfer( dlg, 0 ) just
> before dlg.exec_loop().  Ultimately, a sipTransfer() should be added
> to the %MethodCode for exec_loop().

Yeah this works very well!
Phil, what do you think of this? It solves a nasty problem.
Giovanni Bajo

More information about the PyQt mailing list