#includeQgsRectangle rect(0, 0, 10, 20); double height = rect.height(); // height = 20
#includeIn this example, we create a QgsRectangle object with the same coordinates as in the previous example. We then set the height of the rectangle to 30 using the `setHeight()` method. These examples use the QGIS C++ API, specifically the QgsRectangle class.QgsRectangle rect(0, 0, 10, 20); rect.setHeight(30); // rect = [0, 0, 10, 30]