def METHOD_NAME(self):
    if self._widget.width() != self._widget_last_width:
        self._widget_last_width = self._widget.width()
        new_img = self._img.scaledToWidth(self._widget_last_width,
                                          Qt.SmoothTransformation)
        self._pixmap = QPixmap(new_img)