R
R
railee2021-05-13 23:46:04
Python
railee, 2021-05-13 23:46:04

TypeError: Cannot create a consistent method resolution order (MRO) for bases QMainWindow, Ui_MainWindow?

PyQT5
When I start my application, then the buttons do not work for me there (the actions that should take place do not occur, although everything is written in the code and the buttons themselves are activated), when I close the application, PyCharm gives the following error: 'TypeError: Cannot create a consistent method resolution
order (MRO) for bases QMainWindow, Ui_MainWindow', how can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2021-05-14
@railee

Problems with inheritance, python cannot decide which parent class method to call (MRO - Method Resolution Order)
The class is a descendant of QMainWindow AND Ui_MainWindow. It is not necessary so, take out the initialization of the graphics in the class field, and not through inheritance.
Studio code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question