79560966

Date: 2025-04-08 00:26:32
Score: 0.5
Natty:
Report link

When you create a field in QT Designer, you can to assign an ID or name, then, when you load the ui file into a python class like

uic.loadUi(os.path.join(os.path.dirname(__file__), "customer.ui"), self)

the class load all fields from the ui file and you can to call like:

self.geometry.setText() = "something" #where self.geometry is the name of your ui field.

There is an other example:

class MainPage(QMainWindow):
    def __init__(self):
        super(MainPage, self).__init__()
        uic.loadUi("SysMainUI.ui",self)
        #self.minimizeBtn is a button into "SysMainUI.ui"
        #self.minimizeBtn calls to "minimizar" function when clicked it
        self.minimizeBtn.clicked.connect(self.minimizar)
        self.maximizeBtn.clicked.connect(self.maximizar)
        self.normalizeBtn.clicked.connect(self.normalizar)
        self.closeBtn.clicked.connect(self.cerrar)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: AnnubiS2