title: How to implement a signal/slot defined in Qt Designer
body: <p>I am trying to connect the click() signal of a button to my own function. The button is in a widget that I created with QT Designer. I load the .ui file with QUiLoader like so:</p>
  
  <pre><code>class MyWidget(QtGui.QMainWindow):
      def __init__(self, *args):  
          QtGui.QMainWindow.__init__(self, *args)
  
          loader = QtUiTools.QUiLoader()
          file = QtCore.QFile("pyside_ui_qtdesigner_form_test.ui")
          file.open(QtCore.QFile.ReadOnly)
          self.myWidget = loader.load(file, self)
          file.close()
  
          self.setCentralWidget(self.myWidget)
  
          btn = self.myWidget.findChild(QtGui.QPushButton, "HelloWorldButton")
          btn.clicked.connect(self.slot1)        
  
      def slot1(self):
          print "Received"
  </code></pre>
  
  <p>Is this the correct way to connect to  button clicked() signal? I see that I can wire up signals and slots directly in Qt Designer, but how do I prepare and get to such wire-ups in the code? 
  Side question: The code above works, but the main window shows in the wrong size. How do I ensure that it appears with the right size? Should I do this with minimum height/width constraints?</p>