Skip to content

Commit

Permalink
Fix mainwindow implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed May 22, 2022
1 parent 5ec1541 commit ee1f0a6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions magicgui/backends/_qtpy/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,15 @@ def __init__(self, layout="vertical"):
self._main_window.setCentralWidget(self._qwidget)
self._menus: dict[str, QtW.QMenu] = {}

def _mgui_set_scrollable(self, scrollable: bool):
if scrollable == self._mgui_get_scrollable():
return
super()._mgui_set_scrollable(scrollable)
if scrollable:
self._main_window.setCentralWidget(self._scroll)
else:
self._main_window.setCentralWidget(self._qwidget)

def _mgui_get_visible(self):
return self._main_window.isVisible()

Expand Down

0 comments on commit ee1f0a6

Please sign in to comment.