#includeint main() { QRect rect(0, 0, 100, 100); // create a QRect object with a width of 100 int width = rect.width(); // retrieve the width of the QRect object return 0; }
#includeIn both examples, the QRect class is included with the `#includeint main() { QRect rect(0, 0, 100, 100); // create a QRect object with a width of 100 rect.setWidth(200); // set the width of the QRect object to 200 return 0; }