You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm considering turning Polygon type into a QObject and make seq[Point] one of its properties, but I don't know if it's possible to pass sequences from/to nimqml, that would mean declaring a list property using QQmlListProperty but it seems unavailable
The text was updated successfully, but these errors were encountered:
proctoQVariant*(sequence: seq[QVariant]): QVariant=result=newQVariant()
var arr =newSeqOfCap[DosQVariant](sequence.len)
for e in sequence:
arr.add e.vptr
dos_qvariant_setArray(result.vptr, sequence.len.cint, cast[ptrDosQVariantArray](arr[0].unsafeAddr))
returnresult
returning the generated QVariant to qml via data method of model it ended up correctly on the other side
I've a list of polygons described like
I'm trying to write QAbstractListModel for MapItemView to display those polygons, but the delegate requires
path
to be an array of javascript objectsI'm trying to understand how to pass a seq of coordinates from my data proc considering that each polygon may have a variable number of vertices
I see that nimqml lacks QVariantList and QVariantMap but I am not aware if a workaround solution is possible.
I'm considering turning
Polygon
type into aQObject
and makeseq[Point]
one of its properties, but I don't know if it's possible to pass sequences from/to nimqml, that would mean declaring a list property using QQmlListProperty but it seems unavailableThe text was updated successfully, but these errors were encountered: