Qt Forum

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

    Solved Return JS-array to QML from C++. How?

    General and Desktop
    3
    4
    303
    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.
    • B
      bogong last edited by

      Hello all!
      I need to get data in QML from C++. Is there way to format it like JS-array and pass it to QML? I know how to interact with C++ in QML perfectly. I am about data format/class/object in C++ that will be looking like array in JS when I am calling it.

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        QObjectList, QVariantMap should both work quite like a JS array.

        (Z(:^

        B 1 Reply Last reply Reply Quote 4
        • B
          bogong @sierdzio last edited by

          @sierdzio Thx

          1 Reply Last reply Reply Quote 0
          • ODБOï
            ODБOï last edited by

            QVariantList also

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