by jstimpfle · 7y ago · 0 comments
or CORBA...
More seriously. I'm not too familiar with Qt, but when I had to do a project in it I really hated how anti-modular it was. While it gets high praise from many people, I don't think it's possible to write sane software in it. It's bloat. Even though MFC (which I have to fight currently) is probably worse.
Instead, what we need is a simple API with opaque handles and C function calls. No fancy OOP or macro preprocessors. Simple OpenGL style. At least regarding portability, OpenGL made sane choices I think.
Immediate Mode GUI (IMGUI) has been a trend in the last years, and there are a few popular libraries like DearImGUI, but my impression is they are optimized for quick-and-dirty work. It seems that control and clarity is traded away for small local reductions of keystrokes.
Something like the enlightenment foundation libraries might be what you want[1]. I haven't tried it out properly, but I liked the look of it from the docs, it's a C api and moderately minimalistic.
However, even with C APIs, all these things end up with something like "fancy OOP" (after all, even Gtk is a C Api). That's because GUI widgets seem to be one of the few places really well suited to OO ideas like inheritance and non-trivial getter-setters.
How much of the GObject system is there for the benefit of Gtk and C developers and how much is there for interop with other languages and gui builders though? Programming against the C API it seems to be very much not OOP, you're always casting to a base class to call methods on that level, it doesn't appear that the OO system is used much internally.
FLTK [0] might fit some of this, at the cost of being somewhat ugly.
Of course YMMV, but i wouldn't discount it