QRect rect(10, 10, 50, 50); // create a Qt rectangle object QPoint point(20, 20); // create a point to test if (rect.contains(point)) { // point is inside the rect // do something... }In this example, we create a Qt rectangle object with coordinates (10, 10) and dimensions (50, 50). Then, we create a QPoint object with coordinates (20, 20) to test whether it falls within the bounds of the rectangle using the contains method. Package/library: This is a method provided by the Qt framework, which is a cross-platform application development framework widely used for developing desktop and mobile applications. It is included in the core Qt libraries.