javascript QList<QString> ne marche pas
hello,
Je me demande pourquoi QList<QString> ne marche pas quand on appelle une fonction qui retourne ce type, depuis javascript.
je l'utilise comme ca:
Code:
1 2 3 4 5 6 7
| frame->addToJavaScriptWindowObject( QString("MyApi"), this );
...
QList<QString> MyApi::getList() {
QList<QString> l;
l << "01" << "02" << "03" << "04" << "05";
return l;
} |
et depuis javascript:
Code:
var l = MyApi.getList();
mais cela ne marche pas.
Par contre si j'utilise QList<QVariant>, ca marche.
savez-vous pourquoi?
a+