0

I want to insert a QLabel in a frame of my GUI. If i do it directly in the init function it works:

class MyApp(QMainWindow):
    def __init__(self):
        super().__init__()
        uic.loadUi('MyGui.ui',self) # <<< this is the GUI made with QtDesigner
        
        LB1 = QLabel('MyLabel',self.myFrame) # <<< this is the destination frame
        ...

but if a do the same thing through a function it seems not working:

def MYFUNCTION(self):
    LB1 = QLabel('MyLabel',self.myFrame)
Michele V
  • 1
  • 1
  • 1

0 Answers0