title: how to run a UI created with QTdesigner in python?
body: <p>I am using pyqt5 designer to generate a simple gui and now i have no idea how to run that gui from python program</p>
  <p>this is the python code that was generated using the pyqt5 designer :</p>
  <pre><code># -*- coding: utf-8 -*-
  
  ################################################################################
  ## Form generated from reading UI file 'designeroDCGEn.ui'
  ##
  ## Created by: Qt User Interface Compiler version 5.15.2
  ##
  ## WARNING! All changes made in this file will be lost when recompiling UI file!
  ################################################################################
  
  from PySide2.QtCore import *
  from PySide2.QtGui import *
  from PySide2.QtWidgets import *
  
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          if not MainWindow.objectName():
              MainWindow.setObjectName(u&quot;MainWindow&quot;)
          MainWindow.resize(506, 387)
          self.centralwidget = QWidget(MainWindow)
          self.centralwidget.setObjectName(u&quot;centralwidget&quot;)
          self.gridLayoutWidget = QWidget(self.centralwidget)
          self.gridLayoutWidget.setObjectName(u&quot;gridLayoutWidget&quot;)
          self.gridLayoutWidget.setGeometry(QRect(130, 100, 261, 131))
          self.gridLayout = QGridLayout(self.gridLayoutWidget)
          self.gridLayout.setObjectName(u&quot;gridLayout&quot;)
          self.gridLayout.setContentsMargins(0, 0, 0, 0)
          self.horizontalSlider = QSlider(self.gridLayoutWidget)
          self.horizontalSlider.setObjectName(u&quot;horizontalSlider&quot;)
          self.horizontalSlider.setOrientation(Qt.Horizontal)
  
          self.gridLayout.addWidget(self.horizontalSlider, 0, 0, 1, 1)
  
          self.progressBar = QProgressBar(self.gridLayoutWidget)
          self.progressBar.setObjectName(u&quot;progressBar&quot;)
          self.progressBar.setValue(24)
  
          self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 1)
  
          MainWindow.setCentralWidget(self.centralwidget)
          self.menubar = QMenuBar(MainWindow)
          self.menubar.setObjectName(u&quot;menubar&quot;)
          self.menubar.setGeometry(QRect(0, 0, 506, 21))
          MainWindow.setMenuBar(self.menubar)
          self.statusbar = QStatusBar(MainWindow)
          self.statusbar.setObjectName(u&quot;statusbar&quot;)
          MainWindow.setStatusBar(self.statusbar)
  
          self.retranslateUi(MainWindow)
          self.horizontalSlider.valueChanged.connect(self.progressBar.setValue)
  
          QMetaObject.connectSlotsByName(MainWindow)
      # setupUi
  
      def retranslateUi(self, MainWindow):
          MainWindow.setWindowTitle(QCoreApplication.translate(&quot;MainWindow&quot;, u&quot;MainWindow&quot;, None))
      # retranslateUi
  </code></pre>
  <p>now i have no idea how to run this code in order to show the gui, running this code directly into the python IDE does nothing , i guess that is to be expected?</p>