The setHeight method in QRect class is used to set the height of a rectangle. It takes an integer argument that represents the height of the rectangle.
Example:
#include
int main() { QRect rect(10, 10, 100, 50); // Creating a rectangle with x = 10, y = 10, width = 100, height = 50
rect.setHeight(75); // Setting the height of the rectangle to 75
return 0; }
In the above example, we create a QRect object called "rect" with x = 10, y = 10, width = 100, and height = 50. We then use the setHeight method to set the height of the rectangle to 75.
Package Library: Qt Core Library
C++ (Cpp) QRect::setHeight - 30 examples found. These are the top rated real world C++ (Cpp) examples of QRect::setHeight extracted from open source projects. You can rate examples to help us improve the quality of examples.