title: PyQt get value from GUI
body: <p>I've built an User Interface using <code>QtDesigner</code> and then converted the <code>.ui</code> to <code>.py</code>. The User Interface has different <code>comboBox</code> and <code>textBox</code> from which I want to read the values once the Run button is clicked. Run a function and then populate other text boxes of the user interface once the calculations are completed. However when I change the value of the <code>comboBox</code> and click the button the script still reads the initial value. </p>
  
  <p>I did a simple GUI with a comboBox with two items and a textBox. I'm trying to read the the comboBox text and based on the selected item set the text of the textBox.</p>
  
  <p>Here is the code I'm using to run the <code>GUI</code> and read the value:</p>
  
  <pre><code>from PyQt4 import QtGui
  from pyQt4 import QtCore
  import sys
  import GUI
  
  class MyThread(QtCore.QThread):
      updated = QtCore.pyqtSignal(str)
      def run(self):
          self.gui = Window()
          name = self.gui.gui_Name.currentText()
          print (name)
  
          if name == 'Cristina':
              country = 'Italy'
          else:
              country = 'Other'
  
          self.updated.emit(str(1))
  
  
  class Window(QtGui.QMainWindow, GUI.Home):
      def __init__(self,parent = None):
          super(Window,self).__init__(parent)
          self.setupUi(self)
          self._thread = MyThread(self)
          self._thread.updated.connect(self.updateText)
          self.update()
          self.
          self.pushButton.clicked.connect(self._thread.start)
  
  
      def updateText(self,text):
          self.Country.setText(str(country))
  </code></pre>
  
  <p>Any thoughts?</p>
  
  <p>Thanks</p>