The ui_mainwindow.h file class does not inherit from anything.

Its job is to populate the controls in the User defined QMainWindow class instance that is passed.

MainWindow ISA QMainWindow

mwi = MainWindow()
mwi.ui = new Ui::MainWindow()
mwi.ui->_setupUI(mwi)