Answer the question
In order to leave comments, you need to log in
How to create a separate class from pyqt elements and instantiate its objects in the main interface?
I created a form in qtDesinger and try to split the elements into classes, so that when I click on certain components, I create them?
as shown in the example, I tried to cut the code and paste it into a separate class.
Then I wrote a method
def addAnswerItem():
Ui_Answer(MainWindow)
ui.add_button.clicked.connect(addAnswerItem)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question