Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Return JS-array to QML from C++. How?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 548 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    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
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

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

      (Z(:^

      B 1 Reply Last reply
      4
      • sierdzioS sierdzio

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

        B Offline
        B Offline
        bogong
        wrote on last edited by
        #3

        @sierdzio Thx

        1 Reply Last reply
        0
        • ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #4

          QVariantList also

          1 Reply Last reply
          2

          • Login

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