Skip to content

scripting: Make QTimer constructible

Vlad Zahorodnii requested to merge work/scripting-timer into master

If a QObject is exposed to js using QJSEngine::newQMetaObject(), a new instance of it can be made only with constructors exposed by Q_INVOKABLE

At the moment, QTimer's constructor is not Q_INVOKABLE, so code such as const timer = new QTimer() will not work.

BUG: 439630 FIXED-IN: 5.22.4

Merge request reports

Loading