I have an application that has been scriptable with QtScript for years. I can automate and extend it through js, with access to QObjects, signals, slots, properties, etc.
Unfortunately, QtScript disappeared with Qt6, so (after a long research) my plan was to migrate to PythonQt. That meant rewriting existing scripts, deploying a Python runtime, and praying that all our scripts would still be feasible with PythonQt. I had no particular desire to do all that, so I had been postponing it. The thinkg about QtScript is that, contrary to Qt, online resources are very scarce, you barely find anything but old forum posts from the 2010s
Since I'm on the $20 Codex plan and had 2 resets that was going to expire unused. I thought I might as well spend it on something slightly unreasonable: take the Qt5.15 QtScript sources and see how far I could get on Qt6
-> After roughly one hour, I had a smoke test compiling, linking against Qt6 and evaluating js! (Sol/Medium did the plan and the coding)
Obviously that was not enough to call it a port, so the real work became validation. I kept everything as a small patch series, reviewed the changes, rejected some questionable decisions, and treated CI as the authority, something I'm not realled used to do. The current matrix covers Qt 6.8 LTS and Qt 6.11 on GCC and MSVC, with 29,890 ECMAScript tests and 137 V8 tests passing
I (we?) also ported QtScriptGenerator which was important for my use case. While QtScript is the JavaScript engine, QtScriptGenerator generates the bindings that expose Qt classes and my application classes to JavaScript. This means a script can take an existing button in the application, reconnect it to custom JavaScript logic, create a new QLabel from JavaScript, inject it into an existing QWidget, and send the result there. No rebuild and no new C++ plugin. This is the part I really did not want to lose.
-> took the second reset an another hour to have a project that compiles and pass the smoke tests (this time I used Luna/xhigh)
To me, the interesting AI part was that this kind of old-code archaeology worked surprisingly well with an agent when the work was constrained and split into reviewable steps. My workflow was: plan the change, let it implement one part, review it, test it, reject the strange ideas, continue.
So if someone else is still stuck on Qt 5 mainly because of QtScript or QtScriptGenerator I hope this might be useful.
https://github.com/JulienMaille/qtscript-qt6
https://github.com/JulienMaille/qtscriptgenerator-qt6
cheers!