[solved]QVariant to QFont
can anybody tell me how I can cast a QVariant to QFont?
This QVariant was returned from QAbstractItemView::data(index, Qt::FontRole) and should contain a valid Font...
Unfortunately I have to use Qt 4.5.2, where the member QVariant::toFont() (or the corresponding constructor) does not exist.
QFont theFont = qvariant_cast<QFont>(myVariant);
QFont theFont = myVariant.value<QFont>();