Add interfaces ui to main window (python)

0
class MenuA(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        uic.loadUi("Interfaces/MenuAdmi.ui",self)
        self.actionAgregar.triggered.connect(self.AgregarInvent)

    def AgregarInvent(self):
        AgregarInventario.showNormal()

class AgregarInventario(QDialog):
    def __init__(self):
        QMainWindow.__init__(self)
        uic.loadUi("Interfaces/AgregarInvent.ui",self)

app = QApplication(sys.argv)
MenuA=MenuA()
AgregarInventario= AgregarInventario()
MenuA.show()
sys.exit(app.exec_())

However, when I click on the action, the file Addinvent.ui is displayed in a separate window. How can I make that window appear in the main window and not in a separate window?

    
asked by Jesus Daniel Lopez Jimenez 15.06.2017 в 02:40
source

0 answers