The companion source code to the blog article: http://blog.artlogic.com/2013/05/15/adding-scripting-to-a-qt-application-part-2/