code: def setVisible(self, val):
          
          if val != self.isVisible():
              if val:
                  QWidget.setVisible(self, True)
              else:
                  QWidget.setVisible(self, False)
              self._qpart.updateViewport()
docs: Override the QWidget::setVisible(bool) method to properly
             recalculate the editor viewport.