Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › What do you do when you need to pass big data between qml and c++

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14467

    NgapWei

    As far as I know, QVariantList and QVariantMap can convert to js array and js object, but that mean

    qml part need to copy the data of js to c++, and c++ need to copy the data of js back to the qml. For small data,

    this is not a problem. What if the data is quite big?Like millions of data need to process by c++ and display by the TableView of qml

    Anyway to avoid copy but passing reference between c++ and qml?Thanks

    #14471

    Günther
    Felgo Team

    Hi,

    I am not sure if there is a way to avoid converting QML/C++ types when passing data between QML and C++.
    But I guess you can create a custom ListModel based on QAbstractListModel and use it as the model for your QML view. This way the view can only access the visible/relevant parts of your data through the list model without having to pass huge arrays.

    This is just a guess though, I recommend to maybe ask about this in the official qt forums.
    I’m sure they can provide better and more detailed answers there.

    Best,
    Günther

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded