code: def update_extent_from_map_canvas(self):
          
  
          self.bounding_box_group.setTitle(
              self.tr('Bounding box from the map canvas'))
          # Get the extent as [xmin, ymin, xmax, ymax]
          extent = viewport_geo_array(self.iface.mapCanvas())
          self.update_extent(extent)
docs: Update extent value in GUI based from value in map.
  
          .. note:: Delegates to update_extent()