Open nikwen opened 9 years ago
This would be really helpful and make the use of goqml more straightforward.
This crash happens when passing a string
to QML as well.
panic: handling of string ((*string)(0xc20800a390)) is incomplete; please report to the developers
Is there a workaround for this issue? I'm unable to get a list of strings/structs/ints,... into the qml land, without using context.Call() and passing one element after another, while the qml site reconstructs the original array
The workaround is to create a size variable that is accessible to the QML side. You then need to create a get function on the Go side. The QML can then use a loop and iterate over all the elements and pull them in.
Basically, reconstruct the array on the QML side.
You could also just join the []string into a single string and then separate it in qml
When trying to pass a []string to QML, I always get the following error:
panic: handling of []string (&[]string{"element 1", "element 2", "element 3"}) is incomplete; please report to the developers
A workaround for this is using a wrapping struct like the Colors struct in the delegate example. Then everything works fine.
It doesn't matter whether I try to pass the []string as the return value of a method or using context.SetVar(). The application always crashes.