title: Converting QLineEdit text to float - PySide/pyQt4
body: <p>How do I convert a number in a LineEdit widget to float?</p>
  
  <p>Say I have:</p>
  
  <pre><code>textfield = QtGui.QLineEdit(self)
  </code></pre>
  
  <p>And the user inputs 12345.2 in it. I want that to be converted to a float and stored in a variable X. How do I do it?</p>
  
  <p>I tried the code below, it doesn't work.</p>
  
  <pre><code>INPUT = textfield.text
  INPUT2 = float(INPUT)
  </code></pre>