QRect rect(10, 20, 30, 40); int bottom = rect.bottom(); // Returns 60
QPoint point(20, 50); QRect rect(10, 20, 30, 40); bool inside = rect.contains(point); // Returns trueIn this example, we create a QPoint object at (20, 50) and a QRect object with the same dimensions as the previous example. We then use the contains function to check if the point is inside the rectangle. Since the point is located within the rectangle, the contains function returns true. Package library: Qt Core Library