Details
Description
If an application has a QMainWindow, it appears that the only way to access it is as a QWidget. qApp.allWidgets() and qApp.topLevelWidgets() both return the main window as a QWidget, so the QMainWindow methods aren't accessible. Likewise, the parent() method of widgets parented by the QMainWindow return a QWidget instance, rather than a QMainWindow instance.