#includeThis example creates an object of QSizeF class with floating-point values and then makes use of the toSize() function to convert the QSizeF object to a QSize object which has integer values. The integer values of the QSize object can then be accessed using the width() and height() functions. Package library: Qt.#include int main() { QSizeF sizeF(3.14, 4.25); QSize size = sizeF.toSize(); //Convert QSizeF to QSize int width = size.width(); // Get the width of QSize int height = size.height(); // Get the height of QSize return 0; }