code: def repopulateWinowMenu(self, actionGroup):
          
          for action in self.windowMenu.actions():
              self.windowMenu.removeAction(action)
  
          for action in actionGroup.actions():
              self.windowMenu.addAction(action)
docs: Clear the window menu and fills it with the actions of the actionGroup