QgsRectangle myRectangle(0, 0, 10, 5); double xMax = myRectangle.xMaximum(); // xMax would equal 10In this example, we create a QgsRectangle object with xMinimum of 0, yMinimum of 0, xMaximum of 10, and yMaximum of 5. We then use the xMaximum() method to get the maximum x value of the rectangle, which is 10. The QgsRectangle class is part of the QGIS C++ API library.