QSize size(100, 200); size.setHeight(150);
QSize size(100, 200); int height = size.height();In this example, we create a QSize object with the width of 100 and height of 200. Then we get the height of the object using the method height() and store it in the variable height. The package/library that includes the QSize class is Qt.