code: def _coordinates_changed(self):
          
          if self._are_coordinates_valid():
              point1 = QgsPointXY(
                  self.x_minimum.value(),
                  self.y_maximum.value())
              point2 = QgsPointXY(
                  self.x_maximum.value(),
                  self.y_minimum.value())
              rect = QgsRectangle(point1, point2)
  
              self.tool.set_rectangle(rect)
docs: Handle a change in the coordinate input boxes.