title: How can i validate and exit QInputDialog?
body: <pre><code>...
  Textbox = QtGui.QInputDialog.getText(self, 'Get Name', 
              'Enter  Name:')
          Text =Texbox[0]
  Textbox2 = QtGui.QInputDialog.getText(self, 'Get Surname', 
              'Enter  Surname:')
          Text2 =Texbox2[0]
  ...
  </code></pre>
  
  <p>I am using python 3.3 with pyqt4. When making a GUI, i am asking the user to enter specific details using multiple popup dialog boxes within a function, however when nothing is entered into the box it will accept such value, instead of asking the user to reenter. There is also the option to close the dialog box (the exit button in the top right), however when this is clicked the next dialog box will run instead of stop the entire function. 
  I want the dialog boxes to stop running when the exit button is activated, and the dialog box to not allow no vlaues being entered. If any other information is needed please let me know.</p>