Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Why using QVariantMap as a function parameter does not work in qml ?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.5k Views
  • 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 Offline
    P Offline
    pluswave
    wrote on last edited by
    #1

    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
    0
    • P Offline
      P Offline
      pluswave
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved