#includeIn this example, we create a QPainterPath object that represents a rectangle with coordinates (10, 10) and dimensions of 100 x 100. Then we set the brush to red and use the fillPath() method to fill the area enclosed by the rectangle with the red color. The package library used in this example is Qt, which provides the QPainter class and other drawing and graphics-related classes.#include int main() { QPainter painter; QPainterPath path; path.addRect(10, 10, 100, 100); painter.begin(&window); painter.setBrush(Qt::red); painter.fillPath(path, painter.brush()); painter.end(); return 0; }