This blog post says something about a class called "QScriptProgram" http://labs.trolltech.com/blogs/2009/11/23/qtscript-in-46/
"In order to mitigate this potential issue in the case where you have a small script that you want to run several times, Qt 4.6 comes with a new class called QScriptProgram. QScriptProgram automatically caches the compiled form of your script. This class was added rather late in the 4.6 development and is marked as internal in the 4.6.0 release, so it won't show up in the documentation, but it's there and we think it's safe to start using it"
It is now 4.7 and the class is still internal or at least does not show up in the documentation.