#includeIn the above code, first we create a QSizeF object with width 3.14 and height 2.71. Then, we create a QVariant object using the static member function `fromValue()` of the QVariant class with QSizeF object as argument. Finally, we extract the QSizeF object back from the QVariant using `toSizeF()` member function. `QVariant::toSizeF()` returns a QSizeF object which is the value stored in QVariant. Here, we can see that QVariant provides an easy way to store and retrieve different types of data in one variable. The package library for QVariant is Qt.#include int main() { QSizeF size(3.14, 2.71); QVariant variantSize = QVariant::fromValue(size); QSizeF extractedSize = variantSize.toSizeF(); return 0; }