Given that I have already read many discussions on the subject and that I opted for QUiLoader instead of converting the.ui file to file.py for practicality reasons when writing the code (I use to change widgets a lot with QT Creator 10). Anyway.... this is a summary of the code:
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
self.loader = QUiLoader()
self.mainW = self.loader.load(r"../ReTaBo_v2/grafica/mainRTB.ui", None)
self.mainW.show()
def infoQTstart(self):
app.aboutQt()
if __name__ == "__main__":
app = QApplication([])
app.beep()
mainW = MainWindow()
atexit.register(closeApp)
exit(app.exec())
I have the problem that in QT Creator I have created a slot for an action in the menu connected to the QMainWindow named mainW, a slot named infoQTstart(), but the "def infoQTstart()" function is not executed in the code, and I think this is why I should have it loaded the file.ui not to self.mainW but to the MainWindow instance object ie mainW, but I can't do it.
I also tried doing self.loader.load(...) but if I do self.show() it gives me an empty window, i.e. it wouldn't have loaded the file.ui