Custom itemModel, passing "complex variant" from QML
-
I have a custom item model extending QAbstractItemModel and Implementing setData method. On the QML I can assign data to roleNames and the setData method gets called correctly with the QVariant instance but only if the data is a basic type. Is there a way to pass a QVariantMap from QML to C++ through setData?
Example in QML:
rolename = "string" //works fine
rolename = {key : "value"} //does not work (QVariant is empty on c++ side)
rolename = {"key" : "value"} //does not work (QVariant is empty on c++ side)