code: def hide(self):
          
          if not self.isHidden():
              QWidget.hide(self)
              self._qpart.updateViewport()
docs: Override the QWidget::hide() method to properly recalculate the
             editor viewport.