Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


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
  • #14467


    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


    Felgo Team


    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.


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

RSS feed for this thread

You must be logged in to reply to this topic.