I use scripting in my Qt-app with the QJSEngine. One of my C++ functions returns QList<quint64>
type, and I need to call it from javascript. It's called with no errors. However, it returns QVariant(QList<qulonglong>)
instead of expected list of integers. Another function which is defined to return QList<int>
in C++ works fine from javascript, returning the list of integers. I've looked through the docs of QJSEngine
and QJSValue
, and found no hints for solving this issue. P.S. the quint64
itself works also fine - it's just the list of them which does not work.
How to register types like QList<quint64> in QJSEngine?
578 views Asked by Maximko At
1
You should use QVariantList instead. QVariant supports qlonglong and qulonglong which are the same as qint64 and quint64.
or convert: