QTimer isn't calling myfunction as expected
<p>In the code below the first function gets called but the second function doesn't. What am I doing wrong?</p>

<pre><code>def time_cursor_plot(self):       
    print 'function called'
    t = QtCore.QTimer()
    t.setInterval(1000)
    t.timeout.connect(self.start_timer)        
    t.start()

def start_timer(self):
    print ' this one too'
</code></pre>

<p>the method start_timer is in the same class? otherwise remove "self".</p>

<pre><code>def time_cursor_plot(self):       
    print 'function called'
    t = QtCore.QTimer()
    t.setInterval(1000)
    t.timeout.connect(start_timer)
    t.start()

def start_timer(self):
    print ' this one too'
</code></pre>

python pyqt4 qtimer