Mickey Shine
Mickey Shine

Reputation: 12549

Qt webkit programming, what's the corresponding Qt data types to Javascript data types?

I am currently working on this topic: http://doc.qt.io/qt-5/qtwebkit-bridge.html

I have a C++ class that maps a Javascript object and I want my C++ function to return any Javascript data types, such as object, array, string, number etc.

What's the corresponding Qt data types to JS data types?

e.g. (I don't know if this mapping is correct)

Javascript data type                 Qt data type

string                                QString
array                                 QList, QVariantList
.....

I just want to know how the data type maps to each other.

Upvotes: 0

Views: 1071

Answers (1)

BastiBen
BastiBen

Reputation: 19870

You might find some clues here:

http://doc.qt.io/qt-5/qscriptvalue.html

Upvotes: 1

Related Questions