title: How to add functions to Qt buttons from .ui file?
body: <p>I have just started using and discovering PyQt5 and Qt. I installed it with
  <code>pip install pyqt5</code>. Then I opened the <code>designer.exe</code> that comes with <code>pyqt-tools</code> and made my design.</p>
  <p>After that I converted it from <code>.ui</code> to <code>.py</code> using <code>pyuic design.ui &gt; dialog.py</code>.</p>
  <p>When I run <code>app.py</code> it runs fine and the ui is working fine. But now my problem is: How do I add functions that get called when a button is pressed?</p>
  <p>Here is my <em>app.py</em> code:</p>
  <pre><code>import sys
  from PyQt5.QtWidgets import QDialog, QApplication
  from dialog import Ui_Form
  
  class AppWindow(QDialog)
          def __init__(self):
             super().__init__()
             self.ui = Ui_Form()
             self.ui.setupUi(self)
             self.show()  
                                                
  app = QApplication(sys.argv)
  w = AppWindow()
  w.show()
  sys.exit(app.exec_())
  </code></pre>