Why using QVariantMap as a function parameter does not work in qml ?



  • basically I want something in C++ like

    @class myclass : QObject {
    ...
    Q_INVOKABLE void myfunction( QVariantMap param);
    }@

    and call it in qml:

    @myobject.myfunction({'a':'b'})@

    However it doesn't work as I expected, there is no error reported, but I can't get myfunction called in C++ domain.

    I am using Qt4.8.3 .



  • ok that is my own fault. After recompile my project, issue is gone.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.