Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    QML and Qt Quick
    1
    2
    1381
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pluswave last edited by

      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 .

      1 Reply Last reply Reply Quote 0
      • P
        pluswave last edited by

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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post