Why aren't more desktop apps written with Qt?

As much as I recognize and also have actually recognized in my experience with Qt, it is a great and also very easy to find out collection. It has a quite possibly made API and also is cross - system, and also these are simply 2 of the several attributes that make it eye-catching. I'm interested to recognize why extra designers do not make use of Qt. Exists a shortage which opposes it? Which attribute makes various other libraries much better than Qt? Is the concern connected to licensing?

226
2022-07-25 20:39:10
Source Share
Answers: 2

The factor is straightforward: it does not have excellent bindings to all mainstream languages, and also it is not amazingly constantly ideal for the work handy.

Make use of the appropriate device for the work. If I'm creating a straightforward command - line application, why would certainly I bloat that up with Qt simply for the purpose of it?

As an extra basic solution (which I can offer due to the fact that I'm pertinent below), some designers will merely never ever have actually tried and also determined to utilize it. In many cases there is no certain factor apart from the designer has actually never ever located a demand for it and also checked into it.

10
2022-07-25 21:14:29
Source

I agree that Qt is a nice framework to work with. Still, there are a number of issues I have with it:

  1. It is written in C++, which is a really low level language. The fact alone that it is C++ will make every Qt programmer significantly less productive compared to Frameworks written in other languages. My main beef with C++ as a GUI development language is that it has next to no notion of automatic memory management, which makes the development process a lot more prone to errors. It is not introspective, which makes debugging a lot more difficult. Most of the other major GUI toolkits have some notion of automatic memory management and introspection.
  2. Every cross-platform toolkit suffers from the problem that it only ever can implement the least common denominator of all supported platforms. That, and different UI guidelines on different platforms very much questions the desirability of cross-platform GUIs at a whole.
  3. Qt is very much centered on coding up all your UI. Even though you can use QtDesigner to build some parts of your UI, it is seriously lacking in comparison to, say, (Cocoa/Obj-C) Interface Builder or the .Net tools.
  4. Even though Qt does include a lot of low-level application functionality, it can not compare to having a framework hand-tailored for a certain platform. The native operating system libraries for both Windows and OSX are significantly more powerful than Qt's implementations. (Think audio frameworks, low level file system access etc.)

That said, I love using PyQt for rapid application prototyping or in-house applications. Using Python to do all the coding alleviates the concerns with C++ and actually makes Qt a very pleasant place.


Edit, in response to some comments:

When I wrote about Qt being written in C++, I was not so much complaining about Qt itself, but more about the environment it lives in. It is true that Qt manages its own resources very well, but all your GUI-related-but-not-Qt code has to be written in C++, too. Even there, Qt provides many nice tools, but ultimately, you have to deal with C++ at that level. Qt makes C++ bearable, but it is still C++.

As for introspection, what I mean is this: The hardest cases to debug are when you have a pointer to some object that does not behave the way you think it should. With C++, your debugger might be able to look inside that object a bit (if it happens to have type information at thwt point), but even that does not always work. Take, on the other hand, Cocoa in the same situation. In Cocoa/Obj-C, you would be able to send messages ('call functions') to an object right within the debugger. You can change the objects state, you can query it for its attributes, you can ask it for its type and its function names... This can make debugging a lot more convenient. Qt/C++ has nothing even close to that.

7
2022-07-25 21:08:17
Source