diff --git a/_docs/templates/_npe2_widgets_guide.md.jinja b/_docs/templates/_npe2_widgets_guide.md.jinja index 4e867ee7..5aea415f 100644 --- a/_docs/templates/_npe2_widgets_guide.md.jinja +++ b/_docs/templates/_npe2_widgets_guide.md.jinja @@ -30,8 +30,8 @@ specification: from qtpy.QtWidgets import QWidget class MyPluginWidget(QWidget): - def __init__(self, viewer: 'napari.viewer.Viewer'): - super().__init__() + def __init__(self, viewer: 'napari.viewer.Viewer', parent=None): + super().__init__(parent) self._viewer = viewer ```