title: Pulling text from QLineEdit
body: <p>I made a dialog with a simple QLineEdit and QbuttonBox (lineEdit and buttonBox respectively), now I'm trying to use what is in the line edit when I press OK.  It simply comes out blank and doesn't print during go and prints "None" for the bottom of print(base).  Surfed and found the text() but still no love.  Any help is appreciated.  </p>
  
  <pre><code>from PyQt4 import QtGui, QtCore
  import sys
  
  import x
  
  class Dialog(QtGui.QDialog, x.Ui_Dialog):
  
      def __init__(self):
          super(Dialog, self).__init__()
          self.setupUi(self)
          global base
          base = self.buttonBox.accepted.connect(self.go)
  
  
      def go(self):
          what = self.lineEdit.text()
          return what
          print(what)
  
  
  
  app = QtGui.QApplication(sys.argv)
  form = Dialog()
  form.show()
  app.exec_()
  
  print(base)
  </code></pre>