QSizeF size(10.0, 20.0); size.setHeight(30.0); // size is now QSizeF(10.0, 30.0)
QSizeF* size = new QSizeF(5.0, 5.0); size->setHeight(10.0); // size is now QSizeF(5.0, 10.0) delete size;This example dynamically allocates memory for a new QSizeF object with width 5.0 and height 5.0 using the `new` operator. The `setHeight` method is then called to set the height to 10.0, resulting in a QSizeF object with width 5.0 and height 10.0. Finally, the memory is freed using the `delete` operator. The library/package is Qt Framework.