title: pythonQt catching non integer input
body: <p>Hi are just having a problem catching the instance when a letter rather than a number is entered by the user. Get error 'can't assign number to function call'</p>
  
  <p>It's a simple two QLine Edit boxes where the user has to guess the number...any help would be appreciated. Have just posted the function bit</p>
  
  <pre><code> def my_response():
          global counter, random_number
          timer=QtCore.QTimer
  
          try:
              reply.text()= int(reply.text())
  
              if int(reply.text()) &lt;self. random_number:
                  question.setText("Your guess is too low. Please Try Again")
                  reply.setText(" ")
  
  
              elif int(reply.text()) &gt;self. random_number:
                  question.setText("Your guess is too high. Please Try Again")
                  reply.setText(" ")
  
  
              elif int(reply.text()) ==self. random_number:
                  question.setStyleSheet('QLineEdit{color: blue}')
                  question.setFont(QtGui.QFont("Stencil", 15, QtGui.QFont.Bold))
                  question.setText("Correct")
                  timer.singleShot(250,lambda:question.setText('You won'))
                  reply.setText(" ")
  
          except:
              reply.setText('invalad input number is needed')
  </code></pre>