u/JulienMaille

I used an expiring Codex reset to port QtScript to Qt6

I used an expiring Codex reset to port QtScript to Qt6

Fellow Qt users, here is a short story that might be worth sharing.

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 thing 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 really 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 and another hour to have a project that compiles and passes 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

u/JulienMaille — 10 days ago
▲ 2 r/codex

Codex and sharepoint lists

I manage the todo list of my small team using Sharepoint Lists because anyone with 365 already has an account, it's integrated in Teams and if you just want to share and follow up on a list of tasks it's just the right size (and the right level of customisation).
I was happy to see there's a Codex plugin for Sharepoint, but unfortunately Lists are not supported.
Anyone else using Lists and found a solution to have an mcp or skill that will let Codex read and write to the tasks?

https://preview.redd.it/1eg4t4hj32ch1.png?width=1302&format=png&auto=webp&s=6f1d5005e845562913cd034f4248ac3f46167a74

reddit.com
u/JulienMaille — 1 month ago