Hi Jonathan, On Tue, Oct 11, 2011 at 10:36 PM, Jonathan Zhong <jonathan.zh...@panasonic.aero> wrote: > Hi, > > What are the valid argument types of an invokable member function of a > QML extension C++ class? I have noticed that these work: > > Q_INVOKABLE void myFunc1(int myInputInt); > Q_INVOKABLE void myFunc2(int & myInputInt); // but myInputInt cannot > be modified. > > while this does not work: > > Q_INVOKABLE void myFunc3(int * myOutputInt); // This will cause a > runtime error when running qmlviewer. > > It appears that: > 1. The argument can be an object of (or reference to) a basic C/C++ data > type (int, int &, double, double &, ...). > 2. The argument can be an object or (or reference to) a Qt class which > relates to a basic QML type (QString, QString &, QVariant, QVariant &, ...). > 3. The argument can be a pointer to QObject or its derived classes > (QObject *, QWidget *, ...). > ... > > Is there a Qt documentation page on this subject? > > Perhaps this is a related question: What are the valid return types of > an invokable member function? >
See http://doc.qt.nokia.com/main-snapshot/qtbinding.html#supported-data-types Girish _______________________________________________ Qt-qml mailing list Qt-qml@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-qml