質問

How can I convert a QDateTime into a QJSValue? Converting in the opposite direction is easy: there is QJSValue::isDate and QJSValue::toDateTime.

役に立ちましたか?

解決

According to Qt's help, QJSEngine is used for converting between QJSValue and object-based types (including Date and RegExp).

Try using QJSValue QJSEngine::toScriptValue(const T & value).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top