title: Stackwidget in Pyqt5 python
body: <p>I'm creating a screen with StackWidget consist of 3 pages.
  The problem is that only one page of the stackwidget pages showing all widgets inside it but the other pages cutting three element in the corners, see the photos</p>
  <p>the error page:<br />
  <a href="https://i.stack.imgur.com/P8dJQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P8dJQ.png" alt="the error page" /></a></p>
  <p>correct page and i want the other pages show all widgets in the four corners :<br />
  <a href="https://i.stack.imgur.com/MMpMc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MMpMc.png" alt="correct page and i want the other pages show all widgets in the four corners " /></a></p>
  <pre><code>    from PyQt5 import QtCore, QtGui, QtWidgets
  
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName(&quot;MainWindow&quot;)
          MainWindow.resize(1200, 679)
          self.centralwidget = QtWidgets.QWidget(MainWindow)
          self.centralwidget.setObjectName(&quot;centralwidget&quot;)
          self.pushButton = QtWidgets.QPushButton(self.centralwidget)
          self.pushButton.setGeometry(QtCore.QRect(30, 100, 93, 28))
          self.pushButton.setObjectName(&quot;pushButton&quot;)
          self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
          self.pushButton_2.setGeometry(QtCore.QRect(30, 220, 93, 28))
          self.pushButton_2.setObjectName(&quot;pushButton_2&quot;)
          self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
          self.pushButton_3.setGeometry(QtCore.QRect(30, 330, 93, 28))
          self.pushButton_3.setObjectName(&quot;pushButton_3&quot;)
          self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
          self.stackedWidget.setGeometry(QtCore.QRect(170, 0, 1011, 631))
          self.stackedWidget.setObjectName(&quot;stackedWidget&quot;)
          self.page_3 = QtWidgets.QWidget()
          self.page_3.setObjectName(&quot;page_3&quot;)
          self.pushButton_4 = QtWidgets.QPushButton(self.page_3)
          self.pushButton_4.setGeometry(QtCore.QRect(10, 10, 93, 28))
          self.pushButton_4.setObjectName(&quot;pushButton_4&quot;)
          self.pushButton_5 = QtWidgets.QPushButton(self.page_3)
          self.pushButton_5.setGeometry(QtCore.QRect(880, 20, 93, 28))
          self.pushButton_5.setObjectName(&quot;pushButton_5&quot;)
          self.pushButton_6 = QtWidgets.QPushButton(self.page_3)
          self.pushButton_6.setGeometry(QtCore.QRect(10, 580, 93, 28))
          self.pushButton_6.setObjectName(&quot;pushButton_6&quot;)
          self.pushButton_7 = QtWidgets.QPushButton(self.page_3)
          self.pushButton_7.setGeometry(QtCore.QRect(890, 590, 93, 28))
          self.pushButton_7.setObjectName(&quot;pushButton_7&quot;)
          self.stackedWidget.addWidget(self.page_3)
          self.page_4 = QtWidgets.QWidget()
          self.page_4.setObjectName(&quot;page_4&quot;)
          self.lineEdit = QtWidgets.QLineEdit(self.page_4)
          self.lineEdit.setGeometry(QtCore.QRect(10, 30, 113, 22))
          self.lineEdit.setObjectName(&quot;lineEdit&quot;)
          self.lineEdit_2 = QtWidgets.QLineEdit(self.page_4)
          self.lineEdit_2.setGeometry(QtCore.QRect(870, 580, 113, 22))
          self.lineEdit_2.setObjectName(&quot;lineEdit_2&quot;)
          self.lineEdit_3 = QtWidgets.QLineEdit(self.page_4)
          self.lineEdit_3.setGeometry(QtCore.QRect(30, 570, 113, 22))
          self.lineEdit_3.setObjectName(&quot;lineEdit_3&quot;)
          self.lineEdit_4 = QtWidgets.QLineEdit(self.page_4)
          self.lineEdit_4.setGeometry(QtCore.QRect(860, 30, 113, 22))
          self.lineEdit_4.setObjectName(&quot;lineEdit_4&quot;)
          self.stackedWidget.addWidget(self.page_4)
          self.page_5 = QtWidgets.QWidget()
          self.page_5.setObjectName(&quot;page_5&quot;)
          self.calendarWidget = QtWidgets.QCalendarWidget(self.page_5)
          self.calendarWidget.setGeometry(QtCore.QRect(10, 10, 392, 236))
          self.calendarWidget.setObjectName(&quot;calendarWidget&quot;)
          self.calendarWidget_2 = QtWidgets.QCalendarWidget(self.page_5)
          self.calendarWidget_2.setGeometry(QtCore.QRect(600, 20, 392, 236))
          self.calendarWidget_2.setObjectName(&quot;calendarWidget_2&quot;)
          self.calendarWidget_3 = QtWidgets.QCalendarWidget(self.page_5)
          self.calendarWidget_3.setGeometry(QtCore.QRect(610, 380, 392, 236))
          self.calendarWidget_3.setObjectName(&quot;calendarWidget_3&quot;)
          self.calendarWidget_4 = QtWidgets.QCalendarWidget(self.page_5)
          self.calendarWidget_4.setGeometry(QtCore.QRect(10, 380, 392, 236))
          self.calendarWidget_4.setObjectName(&quot;calendarWidget_4&quot;)
          self.stackedWidget.addWidget(self.page_5)
          MainWindow.setCentralWidget(self.centralwidget)
          self.menubar = QtWidgets.QMenuBar(MainWindow)
          self.menubar.setGeometry(QtCore.QRect(0, 0, 1200, 26))
          self.menubar.setObjectName(&quot;menubar&quot;)
          MainWindow.setMenuBar(self.menubar)
          self.statusbar = QtWidgets.QStatusBar(MainWindow)
          self.statusbar.setObjectName(&quot;statusbar&quot;)
          MainWindow.setStatusBar(self.statusbar)
  
          self.retranslateUi(MainWindow)
          self.stackedWidget.setCurrentIndex(2)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
      def retranslateUi(self, MainWindow):
          _translate = QtCore.QCoreApplication.translate
          MainWindow.setWindowTitle(_translate(&quot;MainWindow&quot;, &quot;MainWindow&quot;))
          self.pushButton.setText(_translate(&quot;MainWindow&quot;, &quot;1&quot;))
          self.pushButton_2.setText(_translate(&quot;MainWindow&quot;, &quot;2&quot;))
          self.pushButton_3.setText(_translate(&quot;MainWindow&quot;, &quot;3&quot;))
          self.pushButton_4.setText(_translate(&quot;MainWindow&quot;, &quot;PushButton&quot;))
          self.pushButton_5.setText(_translate(&quot;MainWindow&quot;, &quot;PushButton&quot;))
          self.pushButton_6.setText(_translate(&quot;MainWindow&quot;, &quot;PushButton&quot;))
          self.pushButton_7.setText(_translate(&quot;MainWindow&quot;, &quot;PushButton&quot;))
  </code></pre>
  <blockquote>
  <p>Blockquote</p>
  </blockquote>
  <pre><code>import sys
  from PyQt5.QtWidgets import QMainWindow, QApplication, QAction ,QFileDialog
  from stackwidgettest import *
  class MyForm(QMainWindow):
      def __init__(self):
          super().__init__()
          self.ui = Ui_MainWindow()
          self.ui.setupUi(self)
          
          self.ui.pushButton.clicked.connect(self.moveforward)  
          self.ui.pushButton_2.clicked.connect(self.moveback)
          self.ui.pushButton_3.clicked.connect(self.movebacks)
          
          
      def moveforward(self):
          self.ui.page_3.show()
          self.ui.page_4.hide()
          self.ui.page_5.hide()
          
      def moveback(self):
          self.ui.page_3.hide()
          self.ui.page_4.show()
          self.ui.page_5.hide()
      def movebacks(self):
          self.ui.page_3.hide()
          self.ui.page_4.hide()
          self.ui.page_5.show()
  
  if __name__==&quot;__main__&quot;:    
      app = QApplication(sys.argv)
      w = MyForm()
      w.show()
      sys.exit(app.exec_())
  </code></pre>