Set QVariant as QMap
-
Can I set a QVariant as a QVector? This is my attempt
@
QMap<QString, int> row;
QVariant v(row);
@But Qt Creator rise this error:
error: no matching function for call to 'QVariant::QVariant(QMap<QString, int>&)'
Can you help me? I've already read all of the examples, but there is nothing about this.
-
Hi,
What does your code have to do with QVector ?
Anyway
@QVariant v = QVariant::fromValue(row);@
But it's not a vector