title: Python Oriented Object, QtPy timer
body: <p>I stuck with my programm, the thing is if I call the function <code>increase()</code> my money don't decrease of 1000, but money goes down under 1000. I think I call many times this function, but I am new in OOP and I will be glad if you help me :) </p>
  
  <p>Greetings</p>
  
  <pre>
  
  class Editor(QtGui.QMainWindow):
  
      def __init__(self):
          super(Editor, self).__init__()
          self.ui=Ui_MainWindow()
          self.ui.setupUi(self)
          self.show()
          self.money = 1
          self.step = 1
          self.counter = 1
  
  
          self.ui.click_money.clicked.connect(self.gagner)
          self.loop()
          self.fact = 1
  
  
  
      def _set_fact(self, new):
          self.fact = new
  
      def _set_money(self, new):
          self.money = new
  
  
      def gagner(self):
          self.money += self.step
          self.ui.money.setText(str(self.money))
  
  
      def increase(self):
  
          if self.money > 1000:
  
              self._set_fact(10)
              self.ui.mine_1.setText("I")
              self.money = self.money - 1000
              self.ui.money.setText(str(self.money))
  
  
  
      def compteur(self):
          self.money += 100 * self.fact
          self.ui.money.setText(str(self.money))
          self.ui.argent_0.clicked.connect(self.increase)
  
  
  
      def loop(self):
          timer = QtCore.QTimer(self)
          timer.timeout.connect(self.compteur)
          timer.start(1000)
  
  
  </pre>