Thanks for the thoughts people.

I suspect I'm better off just running an external script as normal. In the back of my mind I seem to remember doing something similar with Qt a few years ago; but then, I'm getting old.