parameters: (self)
docstring: returns the main window
docstring_summary: returns the main window
docstring_tokens: returns the main window
function: def getMainWindow(self):
          "returns the main window"
          # using QtGui.QApplication.activeWindow() isn't very reliable because if another
          # widget than the mainwindow is active (e.g. a dialog) the wrong widget is
          # returned
          toplevel = QtGui.QApplication.topLevelWidgets()
          for i in toplevel:
              if i.metaObject().className() == "Gui::MainWindow":
                  return i
          raise Exception("No main window found")
function_tokens: def getMainWindow ( self ) : # using QtGui.QApplication.activeWindow() isn't very reliable because if another # widget than the mainwindow is active (e.g. a dialog) the wrong widget is # returned toplevel = QtGui . QApplication . topLevelWidgets ( ) for i in toplevel : if i . metaObject ( ) . className ( ) == "Gui::MainWindow" : return i raise Exception ( "No main window found" )