Skip to content

Commit

Permalink
setup_menu signature
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Nov 2, 2024
1 parent 42366fd commit 69636d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pymodaq_plugins_template/app/custom_app_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ def connect_things(self):
"""Connect actions and/or other widgets signal to methods"""
raise NotImplementedError

def setup_menu(self):
def setup_menu(self, menubar: QtWidgets.QMenuBar = None):
"""Non mandatory method to be subclassed in order to create a menubar
create menu for actions contained into the self._actions, for instance:
Examples
--------
>>>file_menu = self.mainwindow.menuBar().addMenu('File')
>>>file_menu = menubar.addMenu('File')
>>>self.affect_to('load', file_menu)
>>>self.affect_to('save', file_menu)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ def connect_things(self):
"""Connect actions and/or other widgets signal to methods"""
raise NotImplementedError

def setup_menu(self):
def setup_menu(self, menubar: QtWidgets.QMenuBar = None):
"""Non mandatory method to be subclassed in order to create a menubar
create menu for actions contained into the self._actions, for instance:
Examples
--------
>>>file_menu = self.mainwindow.menuBar().addMenu('File')
>>>file_menu = menubar.addMenu('File')
>>>self.affect_to('load', file_menu)
>>>self.affect_to('save', file_menu)
Expand Down

0 comments on commit 69636d7

Please sign in to comment.