0

I have many QtDesigner py files (version 5.11). I want to include the classes of the QtDesigner py files in a main class. Manually, I would do this for the first subclass, mainMenu.py

menu = QtWidgets.QMainWindow() 

menu.Ui_mainMenu = mainMenu.Ui_mainMenu
menu.QtCore = mainMenu.QtCore
menu.QtGui = mainMenu.QtGui
menu.QtWidgets = mainMenu.QtWidgets

Then, I'd have to take the next QtDesigner-generated py file and add its Ui_nextMenu, etc. I suppose that there must be an automated way to populate the menu class with all the Ui_* classes from the files. Any help, please.

  • Why do you have Qt modules in `mainMenu`? – mooglinux Jul 18 '18 at 22:36
  • Hi. I am writing a program with class Example(QMainWindow, menu), where menu contains all the subclasses. Each subclass contains a Qt module with a different GUI. The program will swap one GUI for another based on command and a hierarchy for selection. – oldHornPlayer Jul 19 '18 at 11:49

0 Answers0