6 ms·
What is Qt? Can someone explain it like i'm 5? The video in that blog post makes it look really scary!
by sxp62000 8y ago
What is Qt? Can someone explain it like i'm 5? The video in that blog post makes it look really scary!
- PeCaN 8y agoIt's like Electron except it allows you to make usable applications.
- gmueckl 8y agoQt is a set of interoperating libraries for the development of cross-platform graphical applications. It covers a lot of topics from abstracting basis operating system services to various ways to create the actual UI (with traditional widget hierarchies instantiated in C++ code, declaratively using QML...) and advanced features like embedded webkit or interfacing with OpenGL or Vulkan. The library has two core strengths: it works on virtually every platform that can run a GUI and the application code can be made to be pretty much agnostic of the underlying OS. Unless an application uses OS interfaces directly for fancy things, most of the porting work is just recompiling the code.
- sxp62000 8y agoI noticed on the Qt website that it's used in everything from car dashboards to coffee machine interfaces. Is there a special reason for this? Is Qt hard to get into?
- gmueckl 8y agoIt is used for even more than that. KDE, the Linux desktop environment with its huge set of applications has used Qt since its early releases in the 90s. There is also a large set of commercial desktop applications for Windows and macOS that use Qt. That Qt is used for embedded software UIs is a comparably recent development in its long history. I think the reason for this is that Qt has extremely high quality widgets and graphical elements. They allow you to do things out of the box that would be crazy hacks with most of the competitors. And the options for styling the UIs are very good, too, which matters a lot for these embedded use cases. Is Qt hard to get into? Yes and no. In C++, you are required to use some mechanisms like signals/slots, which are used for routing events. These features look like non-standard language extensions and rely on a special source code preprocessor to generate the glue code that is implied. The other concepts are easier to pick up. And the toolkit is very consistent in the structure of its interfaces, so once you pick up the patterns, you can get very productive.
- sxp62000 8y agoGreat answer! Thank you!
- smolder 8y agoAs I understand it, QT is good for embedded applications because it uses a very direct, weakly/efficiently abstracted API. You can do a lot with minimal computing resources. Putting something like chrome or firefox's rendering engine in embedded devices means carrying across lots of costly bloat or doing absurd work to slim them down. The only thing that might make QT hard to get into is the lack of enthusiasm for it, the sparseness of expertise, stagnant job market, etc. Things that are "not hip" in development usually have similar obstacles.
- sxp62000 8y agoThanks! I totally get what you mean. I'd love to get started with this. Will dig around on their website.
- billsix 8y agoIt’s a library for making windows, buttons, etc (called widgets), for windows Linux and macOS. If you’d like to make graphical applications though, I recommend immediate mode frameworks https://youtu.be/Z1qyvQsjK5Y https://youtu.be/Z1qyvQsjK5Y https://github.com/ocornut/imgui https://github.com/ocornut/imgui https://github.com/vurtun/nuklear https://github.com/vurtun/nuklear
- ahartmetz 8y agoQt is much more than that. The sibling comment by gmueckl explains it properly. I also don't understand the immediate mode recommendation. QWidgets are immediate mode with QPainter. QML is retained mode with a scene graph and OpenGL.