Qt for a non-UI application?

I want to use Qt for a non-UI application. It has the potential to run on the device, but will start on the desktop. Part of the user interface (I know, I said non-UI) will be an HTML (5) / AJAX web server.

I would use only Qt for basic cross-platform things like threads, synchronization, serialization, resources (strings, possibly images), internationalization, etc.

What would be better for something like this, Qt or Boost and creating the cross platform layer itself?

Qt feels a little heavy for what I need, but I want to hear what others have on it.

+4
source share
3 answers

What you offer is quite reasonable. You want to use a number of functions (streams, etc. that you mention) on different platforms. In fact, you have several options:

Option 1 (Bad): write your own cross-platform wrappers. You would have invented the wheel, and you probably couldn't handle the cross-platform cases and functions that Qt already does. This option also means that whoever inherits your code will be dealing with your user library, rather than a well-maintained and well-documented, easily accessible library.

Option 2 (not recommended): use individual cross-platform solutions for each function, for example, streams, networks, etc. This means that you (and your successor) must maintain compatibility with more libraries in the future.

Option 3 (recommended): Use a single, well-documented, easily accessible library to meet all your needs. Qt corresponds to the score.

+1
source

Yes, using QtCore (and other modules without a GUI) should do exactly what you need. As a choice between Boost and QtCore: both perform good tasks, and sometimes alternate. But not always.

Qt (Core) offers mostly functionality. Boost offers mainly tools for achieving functionality. For example, you have templates and functions in Boost, and not in Qt. OTOH, if you need information pumps, etc., you will find them only in Qt.

It really depends on what you are trying to achieve.

+2
source

Yes, in my opinion, everything is in order. I would not say that Qt is heavy compared to Java, for example, which is extremely widely used for such tasks. Qt is very powerful, clean, lightweight and fast. I use it a lot and I do not know any serious flaws.

+2
source

All Articles