i have define a qvariant with metatype of QMetaType::QPolygon but im not able to retrieve the QPolygon from the QVariant.
QVariant is having toInt(), toLin(), toList() but not toPolygon(). but not any function call to convert it back to QPolygon .
i have define a qvariant with metatype of QMetaType::QPolygon but im not able to retrieve the QPolygon from the QVariant.
QVariant is having toInt(), toLin(), toList() but not toPolygon(). but not any function call to convert it back to QPolygon .
You can use the template method T QVariant::value()
for that.
Example:
QPolygon poly = myVariant.value<QPolygon>();