Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 666
Marko Avatar asked Jan 30 '09 16:01

Marko


People also ask

What is a Qt application?

Qt is a cross-platform application and graphical user interface (GUI) framework, a toolkit, that is used for developing software that can be run on different hardware platforms and operating systems.

Why is Qt cross-platform?

Qt is a cross-platform application development framework widely used for developing applications that can run on a wide range of hardware platforms with little to no change in the underlying codebase.

What is Qt in C++?

Qt is a cross-platform application and UI framework. Using Qt, you can write applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code. Qt is partly C++ and partly native code depending on platform. Qt UI APIs wrap native UI components.


2 Answers

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

like image 57
Ariya Hidayat Avatar answered Sep 21 '22 17:09

Ariya Hidayat


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.

like image 37
Yorgos Pagles Avatar answered Sep 20 '22 17:09

Yorgos Pagles