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@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to