tags:

views:

1447

answers:

2

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.

+2  A: 

QtScript is designed to let you export parts of your application to the scripting engine to allow you for more flexibility. You will always have to also write some C++ code to support the QtScript part. I would stick with the alternatives you have already checked out like PyQt or QtRuby depending on your preference.

Yorgos Pagles
+5  A: 

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).

Ariya Hidayat