How to pass ListModel data to C++ function
I have a ListModel in QML:
//********** c++ code
void Context2D::drawIntensityMap(QVariantList data)
I can't figure out how to pass the data to my C++ function.
Would I have to pass it as a QVariantList? If so how would I get to the data in C++.
You can iterate and add the model data into an array and pass that array as QVariantList to the C++ function.