Search code examples
.netqtuser-interface

.NET or Mono vs Qt, which one for cross-platform development?


OK, this is minefield, but trying to understand why one would pick .NET (or equivalently Mono) for cross-platform development over the other toolkit is difficult without experience in the both.

For programmers who may have used both, what features would be missed or desired? Conversely, what would a user of one find missing from the other in terms of paradigm or some other aspect? There is a lot to be said of either toolkit, but comments from someone who has used both would be valuable.

Here are some related questions on the topic:

Edit: Would using Mono only be a viable option if Windows was one of the targetted platforms?


Solution

  • You would pick Mono (and perhaps C#) for cross platform development for the same reason that someone would pick Java or Python. These languages run on a virtual machine and if you are careful choosing libraries and designing code it will work cross platform (without recompilation). Native languages (like C, C++) do have standards so the language is the same on multiple platforms, but the compiler settings and libraries you use may not be cross platform (e.g. processes, networking, etc).

    Besides the technical issues, the familiarity of a cross platform framework saves time. E.g. learning a GUI library can take weeks/months. You're obviously going to save time if the API is the same on all targets.

    Qt4 is well designed, well documented and comes with some useful, solid tools. wxWidgets is becoming massive with dozens of widgets, some of which you'll never use. Qt has fewer widgets that are more flexible. I used to use wx quite a lot but I'm a Qt convert now because of LGPL license, good docs, the designer, PyQt, the new IDE and growing user base.

    Both Qt and wxWidgets have Python bindings (i.e. PyQt and wxPython) so you could write cross platform GUI code using these libraries. For Mono it is more tricky but there is GTK# and Qyoto. I haven't tried either of these but they seem to be getting to a point where they are mature enough to used (e.g. see MonoDevelop).