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

List:       pykde
Subject:    Re: [PyKDE] Issue with QDialog and lifetime
From:       Toby Dickenson <tdickenson () devmail ! geminidataloggers ! co ! uk>
Date:       2005-05-26 8:58:07
Message-ID: 200505260958.07949.tdickenson () devmail ! geminidataloggers ! co ! uk
[Download RAW message or body]

On Wednesday 25 May 2005 16:13, Giovanni Bajo wrote:

> So, I don't see any easy way to take care of this automatically. One has to
> remember to manually destroy the dialog calling deleteLater 

Yes. My PyQt idiom for running a dialog is:

    dlg = WhateverDlg(parent)
    try:
        ok = dlg.exec_loop()
        if ok:
            # do things in here maybe
    finally:
        dlg.deleteLater()

which isnt so bad.

> (which kind of 
> sucks because it means that we are back to manually memory management for
> dialogs)

There has been recent discussion on the python-dev list for syntactic support 
for this. http://www.python.org/peps/pep-0343.html 


-- 
Toby Dickenson

_______________________________________________
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