[PyQt] timers from mainwindow
Sebastian Elsner
sebastianelsner at freenet.de
Wed Sep 15 17:43:28 BST 2010
Of course thats it, thanks :)
On 09/14/2010 08:01 PM, Doug Bell wrote:
> Sebastian Elsner wrote:
>> I would like to start a QTimer from a mainwindow's menu, creating a
>> new instance of a custom class. See the example below. All works
>> except the timer's callback is never called. Asking if the timer is
>> active returns True. I ran out of ideas. Maybe I misunderstand how
>> timers work?! Any help appreciated.
>>
>> def doit(self):
>> Timers()
> You're not keeping a reference to your Timers instance. It's getting
> garbage collected before the timer fires.
>
> Doug
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100915/28a456a7/attachment.html>
More information about the PyQt
mailing list