title: UI made in QT Designer shifts behind Title Bar
body: <p>I made a pyqt GUI in QT Designer 4.8.5. I converted the .gui file to .py and wrote some code to run the application. However, the outcome is not what I wished for. </p>
  
  <p>Expected (as shown when running preview in QT Designer):
  <a href="https://i.stack.imgur.com/OwsP9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OwsP9.png" alt="enter image description here"></a></p>
  
  <p>Result when running the converted .py: 
  <a href="https://i.stack.imgur.com/3hHxc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3hHxc.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the content of the centralwidget is pulled (stretched) behind the title bar. The text in the labels is also a bit blurry. </p>
  
  <p>It used to work without any problems, but I accidentaly upgraded pyqt (was trying something) and since then, it's broken. The code of my converted .py file is below. </p>
  
  <p>Anybody knows what's changed in pyqt and how to fix it? The gui code is written in the file UFA_gui.py:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'UFA_UIv0_1.ui'
  #
  # Created by: PyQt5 UI code generator 5.9.2
  #
  # WARNING! All changes made in this file will be lost!
  
  from PyQt5 import QtCore, QtGui, QtWidgets
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName("MainWindow")
          MainWindow.resize(800, 635)
          MainWindow.setMinimumSize(QtCore.QSize(800, 600))
          icon = QtGui.QIcon()
          icon.addPixmap(QtGui.QPixmap(":/icon/IconUH.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
          MainWindow.setWindowIcon(icon)
          self.centralwidget = QtWidgets.QWidget(MainWindow)
          sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
          sizePolicy.setHorizontalStretch(0)
          sizePolicy.setVerticalStretch(0)
          sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
          self.centralwidget.setSizePolicy(sizePolicy)
          self.centralwidget.setObjectName("centralwidget")
          self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
          self.gridLayout_2.setContentsMargins(9, -1, -1, -1)
          self.gridLayout_2.setObjectName("gridLayout_2")
          self.verticalLayout = QtWidgets.QVBoxLayout()
          self.verticalLayout.setObjectName("verticalLayout")
          self.horizontalLayout = QtWidgets.QHBoxLayout()
          self.horizontalLayout.setObjectName("horizontalLayout")
          self.loadButton = QtWidgets.QPushButton(self.centralwidget)
          self.loadButton.setObjectName("loadButton")
          self.horizontalLayout.addWidget(self.loadButton)
          self.updateButton = QtWidgets.QPushButton(self.centralwidget)
          self.updateButton.setEnabled(False)
          self.updateButton.setObjectName("updateButton")
          self.horizontalLayout.addWidget(self.updateButton)
          self.saveButton = QtWidgets.QPushButton(self.centralwidget)
          self.saveButton.setEnabled(False)
          self.saveButton.setObjectName("saveButton")
          self.horizontalLayout.addWidget(self.saveButton)
          self.verticalLayout.addLayout(self.horizontalLayout)
          self.checkBox_wintertijd = QtWidgets.QCheckBox(self.centralwidget)
          self.checkBox_wintertijd.setEnabled(False)
          self.checkBox_wintertijd.setObjectName("checkBox_wintertijd")
          self.verticalLayout.addWidget(self.checkBox_wintertijd)
          self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
          self.textEdit.setObjectName("textEdit")
          self.verticalLayout.addWidget(self.textEdit)
          self.gridLayout_2.addLayout(self.verticalLayout, 0, 0, 1, 1)
          self.verticalLayout_2 = QtWidgets.QVBoxLayout()
          self.verticalLayout_2.setObjectName("verticalLayout_2")
          self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
          self.horizontalLayout_2.setContentsMargins(-1, -1, 0, -1)
          self.horizontalLayout_2.setObjectName("horizontalLayout_2")
          self.label_2 = QtWidgets.QLabel(self.centralwidget)
          self.label_2.setMinimumSize(QtCore.QSize(0, 23))
          self.label_2.setMaximumSize(QtCore.QSize(65, 23))
          self.label_2.setObjectName("label_2")
          self.horizontalLayout_2.addWidget(self.label_2)
          self.comboBox = QtWidgets.QComboBox(self.centralwidget)
          self.comboBox.setEnabled(False)
          self.comboBox.setMinimumSize(QtCore.QSize(150, 23))
          self.comboBox.setMaximumSize(QtCore.QSize(100, 23))
          self.comboBox.setObjectName("comboBox")
          self.horizontalLayout_2.addWidget(self.comboBox)
          self.label_3 = QtWidgets.QLabel(self.centralwidget)
          self.label_3.setObjectName("label_3")
          self.horizontalLayout_2.addWidget(self.label_3)
          spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
          self.horizontalLayout_2.addItem(spacerItem)
          self.verticalLayout_2.addLayout(self.horizontalLayout_2)
          spacerItem1 = QtWidgets.QSpacerItem(20, 17, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
          self.verticalLayout_2.addItem(spacerItem1)
          self.label = QtWidgets.QLabel(self.centralwidget)
          self.label.setObjectName("label")
          self.verticalLayout_2.addWidget(self.label)
          self.webView = QtWebEngineWidgets.QWebEngineView(self.centralwidget)
          self.webView.setUrl(QtCore.QUrl("about:blank"))
          self.webView.setObjectName("webView")
          self.verticalLayout_2.addWidget(self.webView)
          self.verticalLayout_2.setStretch(2, 6)
          self.verticalLayout_2.setStretch(3, 3)
          self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
          self.gridLayout_2.setColumnStretch(0, 1)
          self.gridLayout_2.setColumnStretch(1, 1)
          MainWindow.setCentralWidget(self.centralwidget)
          self.menubar = QtWidgets.QMenuBar(MainWindow)
          self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21))
          self.menubar.setObjectName("menubar")
          MainWindow.setMenuBar(self.menubar)
          self.statusbar = QtWidgets.QStatusBar(MainWindow)
          self.statusbar.setObjectName("statusbar")
          MainWindow.setStatusBar(self.statusbar)
  
          self.retranslateUi(MainWindow)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
      def retranslateUi(self, MainWindow):
          _translate = QtCore.QCoreApplication.translate
          MainWindow.setWindowTitle(_translate("MainWindow", "Mainwindow"))
          self.loadButton.setText(_translate("MainWindow", "Open "))
          self.updateButton.setText(_translate("MainWindow", "Update "))
          self.saveButton.setText(_translate("MainWindow", "Exporteer "))
          self.checkBox_wintertijd.setText(_translate("MainWindow", "Gemeten in wintertijd"))
          self.label_2.setText(_translate("MainWindow", "KNMI "))
          self.label_3.setText(_translate("MainWindow", "Temperatuur "))
          self.label.setText(_translate("MainWindow", "TextLabel"))
  
  from PyQt5 import QtWebEngineWidgets
  </code></pre>
  
  <p>The code start the application: </p>
  
  <pre><code>import sys
  from PyQt5.QtWidgets import QApplication, QWidget
  from PyQt5 import QtWidgets
  from UFA_gui import Ui_MainWindow
  
  class MyFirstGuiProgram(Ui_MainWindow):
  
      def __init__(self, MainWindow):
  
          Ui_MainWindow.__init__(self)
          self.setupUi(MainWindow)
  
          self.loadButton.clicked.connect(self.load_file)
  
      def load_file(self):
          self.label.setText("click")
  
          self.updateButton.setEnabled(True)
          self.saveButton.setEnabled(True)
  
  if __name__ == '__main__':
  
      app = QApplication(sys.argv)
  
      MainWindow = QtWidgets.QMainWindow()
  
      prog = MyFirstGuiProgram(MainWindow)
  
      MainWindow.show()
      sys.exit(app.exec_())
  </code></pre>