[PyKDE] question about tutorial
dan at eevolved.com
Fri Dec 15 23:37:23 GMT 2000
if a question like this does not belong in the mailing list, i apologize.
In the aclock.py tutorial
def __init__(self, *args):
apply(QWidget.__init__,(self,) + args)
self.time = QTime.currentTime()
internalTimer = QTimer(self)
self.connect(internalTimer, SIGNAL("timeout()"), self.timeout)
there is a Qtimer created in the __init__ method, but isn't it local? Won't
it be garbage collected upon exit of the method? Obviously it isn't because
the demo works, but that really confuses me. Was some code put it so used
QObjects aren't destroyed once they are out of scope?
More information about the PyQt