How to replace QScript in QT6
-
I am trying to build our app using Qt6 on MacOS 13.5.1
The app was written in Qt5, but on the MacBook I only have macosx11.3 SDK, so had to try buidling using Qt 6.4.2.
The issue I am having is the error
Unknown module(s) in QT: script
I note that QScript is removed from Qt6.
QScript is used in only a few places in the code. I was wondering how the following would be replaced (not full code, but hope someone can give me pointers here).
FunctionPlotGraphicsView *view; FunctionPlotData plot; QScriptValue func; QScriptEngine engine; QScriptValueList args; . . args << qreal_value; qreal y = plot->func.call(QscritValue(), args).toNumber(); QScriptValue global = _view->engine.globalObject(); -
I am trying to build our app using Qt6 on MacOS 13.5.1
The app was written in Qt5, but on the MacBook I only have macosx11.3 SDK, so had to try buidling using Qt 6.4.2.
The issue I am having is the error
Unknown module(s) in QT: script
I note that QScript is removed from Qt6.
QScript is used in only a few places in the code. I was wondering how the following would be replaced (not full code, but hope someone can give me pointers here).
FunctionPlotGraphicsView *view; FunctionPlotData plot; QScriptValue func; QScriptEngine engine; QScriptValueList args; . . args << qreal_value; qreal y = plot->func.call(QscritValue(), args).toNumber(); QScriptValue global = _view->engine.globalObject();