(self, widget: Optional[QGraphicsWidget])
Set the central widget. Previous widget (if set) is unset.
        The widget needs to be in this view's `scene()`
Set the central widget. Previous widget (if set) is unset.
        The widget needs to be in this view's `scene()`
Set the central widget . Previous widget ( if set ) is unset . The widget needs to be in this view s scene ()
def setCentralWidget(self, widget: Optional[QGraphicsWidget]) -> None:
        """
        Set the central widget. Previous widget (if set) is unset.
        The widget needs to be in this view's `scene()`
        """
        if self.__centralWidget is not None:
            self.__centralWidget.removeEventFilter(self)
            self.__centralWidget.destroyed.disconnect(
                self.__on_centralWidgetDestroyed)
        self.__centralWidget = widget
        if widget is not None:
            widget.installEventFilter(self)
            widget.destroyed.connect(self.__on_centralWidgetDestroyed)
            self._layout()
def setCentralWidget ( self , widget : Optional [ QGraphicsWidget ] ) -> None : if self . __centralWidget is not None : self . __centralWidget . removeEventFilter ( self ) self . __centralWidget . destroyed . disconnect ( self . __on_centralWidgetDestroyed ) self . __centralWidget = widget if widget is not None : widget . installEventFilter ( self ) widget . destroyed . connect ( self . __on_centralWidgetDestroyed ) self . _layout ( )