سؤال

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