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?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 555 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 12 Mar 2019, 07:38 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
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 12 Mar 2019, 07:53 last edited by
      #2

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

      (Z(:^

      B 1 Reply Last reply 12 Mar 2019, 08:35
      4
      • S sierdzio
        12 Mar 2019, 07:53

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

        B Offline
        B Offline
        bogong
        wrote on 12 Mar 2019, 08:35 last edited by
        #3

        @sierdzio Thx

        1 Reply Last reply
        0
        • O Offline
          O Offline
          ODБOï
          wrote on 12 Mar 2019, 08:36 last edited by
          #4

          QVariantList also

          1 Reply Last reply
          2

          1/4

          12 Mar 2019, 07:38

          • Login

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