#includeIn this example, we create a rectangle r with the top left corner at (10,10) and a width and height of 20. We also create a point p at (15,15). The .contains() method is then used to check if point p lies inside the rectangle r. The Rect and Point classes are part of the Qt framework, which is a cross-platform development framework for C++. The Rect class is defined in the QRect.h header file.#include int main() { Rect r(10, 10, 20, 20); Point p(15, 15); if(r.contains(p)) { std::cout << "Point is inside the rect" << std::endl; } else { std::cout << "Point is outside the rect" << std::endl; } return 0; }