<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">Of
course thats it, thanks <span class="moz-smiley-s1" title=":)"><span>:)</span></span>
<br>
<br>
<br>
On 09/14/2010 08:01 PM, Doug Bell wrote:
<br>
<blockquote type="cite" style="color: rgb(0, 0, 0);">Sebastian Elsner
wrote:
<br>
<blockquote type="cite" style="color: rgb(0, 0, 0);">I would like to
start a QTimer from a mainwindow's menu, creating a
<br>
new instance of a custom class. See the example below. All works
<br>
except the timer's callback is never called. Asking if the timer is
<br>
active returns True. I ran out of ideas. Maybe I misunderstand how
<br>
timers work?! Any help appreciated.
<br>
<br>
def doit(self):
<br>
Timers()
<br>
</blockquote>
You're not keeping a reference to your Timers instance. It's getting
<br>
garbage collected before the timer fires.
<br>
<br>
Doug
<br>
_______________________________________________
<br>
PyQt mailing list <a class="moz-txt-link-abbreviated"
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<br>
<a class="moz-txt-link-freetext"
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>
<br>
</blockquote>
<br>
</div>
</body>
</html>