Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Question about custom implementation of ECMAScript primitives.



  • I am working on a QML integration with .NET.

    I'd like to map .NET's List<T> type to QVariantList.

    When QVaraintList is loaded in QML, it is an array (Array.isArray(obj) == true).

    This is fine, except it means I have to enumerate my .NET type immediately, which can be a problem for large collections.

    I'd like to expose my .NET type as if it is an array, but implement my own functions that simulate an array (slice, push, etc).

    Can a qml script guru set my on the right track? Maybe use QQmlV4Function as an argument, and interface with the v8 engine directly?


Log in to reply