Search code examples
user-interfaceqtqtscript

Creating GUI application completely in QtScript, what is your opinion?


Since QT license change is announced I started to take a look at the QT framework. It looks nice, but I don't like having to use C++. I know there are different bindings for various languages, but QtScript seems most interesting to me.

Is it possible to use QtScript to code complete GUI application (with help from UI designer, of course), or it is only meant for scripting parts of existing applications.


Solution

  • Yes, it is perfectly possible to do so. However, since Qt (until 4.5) does not ship the Qt Script bindings by default, you need to generate it and probably include it with your application. But this is one-time step only, refer to http://labs.trolltech.com/page/Projects/QtScript/Generator to get the binding.

    Here is an example: http://labs.trolltech.com/blogs/2009/01/06/simple-qtscript-based-bar-chart/. The application logic is completely in QtScript. You just need to launch with the interpreter (see the binding generator above).