code: def resize(self, dims):
          
          width, height = dims[:2]
          self.logger.debug("renderer reconfigured to %dx%d" % (
              width, height))
          if self.surface_type == 'qpixmap':
              self.surface = QPixmap(width, height)
          else:
              self.surface = QImage(width, height, self.qimg_fmt)
docs: Resize our drawing area to encompass a space defined by the
          given dimensions.