6/14/2023 0 Comments Houdini python load qt.ui fileI know (believe) this is to do with declaring global mainWindow in the caller (else mainWindow will just be an local variable), but e.g. Now I want other dialog class to be able to call mainWindow.someFunc(). # (note that this is declared outside of any class) So code skeleton of main.py starts out looking like # Global variable for Main window But cannot figure how to do this in Python! ![]() I'm happy to follow the simple pattern of, viz. I will be wanting to call a function in the main window class (to provide some information to outside world). The main window will of course be open, but not necessarily the parent of the other dialog class, so I can't just take the "parent/owner" of the dialog. I wish to access my QMainWindow from another class. ![]() This is probably a question more about Python than Qt/PyQt themselves, though depends on solution. So I'm newish to both Pyton & Qt (& PyQt).
0 Comments
Leave a Reply. |