[PyKDE] question about tutorial
dan
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
(snip)
class AnalogClock(QWidget):
def __init__(self, *args):
apply(QWidget.__init__,(self,) + args)
self.time = QTime.currentTime()
internalTimer = QTimer(self)
self.connect(internalTimer, SIGNAL("timeout()"), self.timeout)
internalTimer.start(5000)
...
(/snip)
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?
thanks,
Dan
More information about the PyQt
mailing list