[Qt-qml] Q_INVOKABLE member function: Valid argument types
Bo Thorsen
bo at fioniasoftware.dk
Thu Oct 13 17:58:47 CEST 2011
Den 12-10-2011 18:37, Jonathan Zhong skrev:
> Hi Girish,
>
> Yes. Your proposed solution is simpler and more efficient. For multiple
> values, especially when they have different data types, return a
> QVariantMap:
>
> QVariantMap value;
> value.insert("myOutputInt", myOutputInt);
> value.insert("myOutputStr", myOutputStr);
> return value;
Since you are returning exactly two integers, you could put them in a
QPoint and return that.
Yes, this is a hack, but not one I would have a problem using.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-qml
mailing list