title: Wizard-like user interface with buttons next and back
body: <p>I'm developing an application using the Qt Designer and PyQt4, I need to make several screens where each screen I capture user-specific data, for that I need to implement a next button and a back button similar to </p>
  
  <p><a href="https://i.stack.imgur.com/4DUoH.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4DUoH.gif" alt="https://files.support.epson.com/htmldocs/pho825/pho825f1/images/2knhw1.gif"></a></p>
  
  <p>where the current screen closes and the following opens when the user clicks next or if he clicks back, the screen closes and opens the previous screen, I made an example with only the next buttons and back to exemplify, if I was not clear:</p>
  
  <pre><code>from PyQt4.QtGui import *
  from PyQt4.QtCore import *
  
  class Frm(QWidget):
      def __init__(self, parent = None):
          super(Frm, self).__init__(parent)
  
          next = QPushButton('Next &gt;', self)
          back = QPushButton('&lt; Back', self)
  
          hbox = QHBoxLayout()
  
          hbox.addWidget(back)
          hbox.addWidget(next)
  
          self.setLayout(hbox)
  
  if __name__ == '__main__':
      import sys
      root = QApplication(sys.argv)
      app = Frm(None)
      app.show()
      root.exec_()
  </code></pre>
  
  <p>In short: How do I implement a function that calls another screen and close the current at the click of a button?</p>