Thursday, December 2, 2010

Using Qt for non-GUI applications

Maybe you're thinking this guy is crazy. We all know that Qt is a framework to developed application with rich GUIs the easy and portable way. But we can at the same time take advantage of the core and additional libraries provided by Qt and develop non-GUI applications.

Let me try to explain my point. Fortunately, Qt is structured as a set of modules. You may want to benefit from the signals and slots mechanism in order to communicate objects. Need to write an application with heavy use of networking? Use the network module and inherit lots of methods for managing networking from a high level approach (forget about sockets ...). Your application is dealing with XML information? Parse it in a breeze using the XML module.

Remember that QtCore and QtGui modules are include in every project, so to get rid of the GUI module you need to change your .pro file to add:
QT -= gui
And the good thing about all this, you get one application that you can deploy in several platforms.

No comments:

Post a Comment