Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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