Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to pass ListModel data to C++ function
cmessineo last edited by
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.