Delete widget in WrapperLayout.unwrap()

This was removed in f5f3bf63b5 but is still
needed so that the underlying QWebEngineView is actually deleted with Qt <
5.12. Otherwise, test_spawning_an_editor_and_closing_the_tab in
test_editor_bdd.py would fail because the element doesn't actually vanish.
This commit is contained in:
Florian Bruhin 2020-06-23 18:21:51 +02:00
parent 523fcfdc17
commit adbaf092a2
1 changed files with 1 additions and 0 deletions

View File

@ -279,6 +279,7 @@ class WrapperLayout(QLayout):
return
assert self._container is not None
self._widget.setParent(None) # type: ignore[call-overload]
self._widget.deleteLater()
self._widget = None
self._container.setFocusProxy(None) # type: ignore[arg-type]