convert a std vector <int> to QVariant

1.7k views Asked by At

I would like to be able to convert a std string to a QVariant.

#include<vector>
#include <QMetaType>   

using namespace std;
Q_DECLARE_METATYPE(vector<int>)
int main()
{ 
vector <int> blabla;
QVariant wanted=QVariant(blabla)
}

no matching function for call to 'QVariant::QVariant(std::vector&)' QVariant organsizes=QVariant(this->organsizes);

How can I solve this?

0

There are 0 answers