QJSValue: Mention how to construct QJSValue from other non-obvious types
This has come up in queries from users, so let's add a helping hand. Change-Id: If4e5efdd8969a71a78fc88ae168ede8d681858aa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
9ce6712c98
commit
fd0d446453
|
@ -73,7 +73,8 @@
|
|||
For the object-based types (including Date and RegExp), use the
|
||||
newT() functions in QJSEngine (e.g. QJSEngine::newObject())
|
||||
to create a QJSValue of the desired type. For the primitive types,
|
||||
use one of the QJSValue constructor overloads.
|
||||
use one of the QJSValue constructor overloads. For other types, e.g.
|
||||
registered gadget types such as QPoint, you can use QJSEngine::toScriptValue.
|
||||
|
||||
The methods named isT() (e.g. isBool(), isUndefined()) can be
|
||||
used to test if a value is of a certain type. The methods named
|
||||
|
|
Loading…
Reference in New Issue