title: QTimer runs after Dialog has been closed
body: <p>I have a <strong>QDialog</strong>, where i create a <strong>QTimer Object</strong>, which triggers every <strong>n</strong> seconds a function. After closing the Dialog (hitting the x button), the timer is still firing and seems to be not destroyed. How can i stop it? Currently as a workaround i am explicitly calling <strong>Qtimer.stop()</strong> when entering the  <strong>closeEvent()</strong>? </p>
  
  <p>I would expect that every class-member is deleted, when the Window is closed, even when i call the <strong>Deconstructor</strong> explicitly, the Qtimer object persists.</p>
  
  <pre><code>from PyQt4 import QtGui, QtCore
  import sys
  
  
  
  def update():
      print "tick..."
  
  class Main(QtGui.QDialog):
  
      def __init__(self, parent = None):
          super(Main, self).__init__(parent)
  
  
          self.timer = QtCore.QTimer()
          self.timer.timeout.connect(update)
          self.timer.start(2000)
  
          # scroll area
          self.scrollArea = QtGui.QScrollArea()
          self.scrollArea.setWidgetResizable(True)
  
          # main layout
          self.mainLayout = QtGui.QVBoxLayout()
  
  
          self.setLayout(self.mainLayout)
  
  
      def closeEvent(self, evt):
          print "class event called"
          self.timer.stop()
  
  myWidget = Main()
  myWidget.show()
  </code></pre>