I was experimenting with Qt Designer and I noticed that there is an option to get Python code for the UI.
But when I run this code in Python IDE nothing happens.
Is this code not suppose to run the designed UI?
EDIT: Here is what the generated code looks like:
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'designertfNTig.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_Form(object):
def setupUi(self, Form):
if not Form.objectName():
Form.setObjectName(u"Form")
Form.resize(640, 480)
self.verticalLayoutWidget = QWidget(Form)
self.verticalLayoutWidget.setObjectName(u"verticalLayoutWidget")
self.verticalLayoutWidget.setGeometry(QRect(179, 9, 251, 471))
self.verticalLayout = QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.pushButton_2 = QPushButton(self.verticalLayoutWidget)
self.pushButton_2.setObjectName(u"pushButton_2")
self.verticalLayout.addWidget(self.pushButton_2)
self.retranslateUi(Form)
QMetaObject.connectSlotsByName(Form)
# setupUi
def retranslateUi(self, Form):
Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
self.pushButton_2.setText(QCoreApplication.translate("Form", u"PushButton", None))
# retranslateUi

QApplicationattached to it.