The class contains the following:
Q_PROPERTY(QList<double> switch1 READ switch1 WRITE setSwitch1 NOTIFY switch1Changed)
void setSwitch2(QList<double> arg)
{
if (m_switch2 != arg)
{
m_switch2 = arg;
emit switch2Changed(arg);
}
}
The following is shown:
setSwitch2(QList<double>::fromVector(QVector<double>::fromStdVector(data->switch2)));
but now my data type is QVariantListinstead QList<double>.
How can I replace QList QVariant now?
This does not work:
setSwitch1(QVariantList::fromVector(QVector<QVariant>::fromStdVector(data->switch1)));
source
share