<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Script engine - porting from Qt5 to Qt6 issues]]></title><description><![CDATA[<p dir="auto">Hello everyone,</p>
<p dir="auto">I am trying to port a program from Qt5 to Qt6, and I am encountering some issues with the scripting system. Currently, the program uses QScriptEngine and exposes both custom types and C++ standard types to the engine using qScriptRegisterMetaType.</p>
<p dir="auto">I have switched to QJSEngine, and most functionalities are working fine. However, I am unable to expose my custom types since the qScriptRegisterMetaType method no longer exists.<br />
I checked the documentation and found some forum posts discussing this issue, but there don’t seem to be any solutions.</p>
<p dir="auto"><a href="https://forum.qt.io/topic/143674/porting-from-qtscript-to-qjsengine-setscriptclass-and-toscriptvalue-and-fromscriptvalue-functions">https://forum.qt.io/topic/143674/porting-from-qtscript-to-qjsengine-setscriptclass-and-toscriptvalue-and-fromscriptvalue-functions</a><br />
<a href="https://forum.qt.io/topic/24368/custom-c-types-and-qjsengine">https://forum.qt.io/topic/24368/custom-c-types-and-qjsengine</a></p>
<p dir="auto">Is there any alternative to qScriptRegisterMetaType, or a way to manually expose custom types?</p>
<p dir="auto">Thanks,<br />
Yuri</p>
]]></description><link>https://forum.qt.io/topic/160872/script-engine-porting-from-qt5-to-qt6-issues</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 05:34:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/160872.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Feb 2025 09:52:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script engine - porting from Qt5 to Qt6 issues on Wed, 12 Feb 2025 05:36:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi Yuri,</p>
<p dir="auto">I'm one of the posters you mentioned above.<br />
Sadly the solution I eventually went with was to use quickjs as our javascript engine which gives much more control over the java script environment and allowed me to create/control the plumbing around using c++ types within the javascript environment.</p>
<p dir="auto">Sorry i dont have any other help for you.</p>
]]></description><link>https://forum.qt.io/post/820451</link><guid isPermaLink="true">https://forum.qt.io/post/820451</guid><dc:creator><![CDATA[Jammin44fm]]></dc:creator><pubDate>Wed, 12 Feb 2025 05:36:48 GMT</pubDate></item></channel></rss>