GTK4 for Graphical User Interfaces
ssalewski.de
ssalewski.de
Unflagged.
And it is outdated, as there would be no GTK4 - instead it would be released as GTK40, so some API could be changed and samples from this book would not work anymore.
The author has a very anti-C stance to say the least. For an article about writing UI, it spends a lot of time laying out all the short-coming of using C to build a UI toolkit.
Amusingly, Qt is mentioned as initially not having a FOSS license but "now available in version 6 with much less restricted licenses"... that's quite a weak praise given that it is available as LGPL, GPL or commercial non FOSS licensing. He then goes on criticizing Qt for being bloated. Most people would rather say that is very feature-rich. Qt is also modular. You don't need to include libraries you don't use.
English does not seems to be the author native language; there are many bad choices of word, like saying that C in "restricted"; I think he meant it is "limited".
I was already writing UI applications with an LGPL licensed Qt 4.x, so the version 6 hasn't changed in that regard, just like version 5 didn't change either. And I'm sure Qt was already FOSS in earlier versions, but 4 and 5 are the ones I can confirm having FOSS licenses.
not if you use it throuh vcpkg or https://pypi.org/project/aqtinstall/ or your distro's package manager or mingw or...
IME it used to be possible to anonymously get binaries and sources from Qt themselves.
So this is reheating a 20 year old talking point.
Not fully; only the X11 and embedded version was open source (GPL). The Windows version was only available under a commercial license until 2005. Because of GPL I had to pay for a commercial license for three platforms until 2008. LGPL became available in 2009.
> I'm still sad that some people are spreading so much fud about it 20 years later
It is not exactly the case that the Qt Company clearly points out to users that they can use Qt free of charge under LGPL; rather the opposite seems to be the case. I know various people who primarily bought a commercial licence because they did not consult their own legal advisor and instead followed the recommendations of the QTC sales people.
To be fair, if they weren't willing to put in the relatively small amount of effort required to find out how it was licensed, they can clearly affort to pay for the commercial license and if that's true, they probably should do so anyways in order to fund its development.
And yes, I know a very similar argument can be made for horrible dark patterns like the crap TurboTax in the US pulls, but B2B and B2C are very different situations (power imbalance).
That's not the point. They are single developers or start-ups not used to match what they intended to develop with the LGPL license terms. Their primary mistake was to trust the sales guys. I had personal contact with some of them, and in no case was a commercial licence objectively necessary. Sure, it's not the only way inexperienced people get ripped off, but it doesn't help confidence and clarity, which is what this thread is about.
I guess it's possible to sort through the individual components and find a subset that is LGPL and not GPL, but that's a lot of work, especially if you're not familiar with Qt already and need to make a decision.
> The advantage of Qt is that it is active developed and supports all important operating systems including the mobile Android and iOS systems with a native look and feel.
These feel...like important things for your application framework to support. Qt's "bloat" is listed as the only major disadvantage, but only after lamenting GTK's own bloat.
> For many Windows or macOS users GTK has the disadvantage that GTK draws all it widgets itself, it does not use the native graphical elements of the proprietary systems. GTK allows theming by use of cascading style sheets (CSS) so it can be tuned to look not too strange on Windows and macOS, but look and feel generally does not really map to native apps.
Personally, this is one of the worst disadvantages of GTK for me, and makes me cringe when I see an app using GTK's default styling. Even Electron (also lamented for its bloat) does "native" controls by default.
There's really got to be a better argument for using GTK than "it's less bloated and is written in C"
Calling the adwaita theme “cringey” seems silly to me. The latest Mac default style is very similar. Windows “native” look and feel is a joke. A ton of popular apps don’t care about native look anyways they just want their branding.
Qt just tried to pull some crap again with their licensing too.
I appreciate the author because I like nim and gtk development. He even fixed an issue for me last year when I was trying these bindings out.
I don’t agree with his slightly pessimistic view though. There are a lot of new people learning it right now spurred by the new phones and mobile Linux desktop ends.
It’s true the main appeal is to people who like their default styling and the gnome desktop
Really selling it there. If I'm going to learn a thing the last thing I want to hear is "dead project"
Mostly it just means the scope of future plans for the project remains narrow
The Linux logo was created on a Motif version of GIMP (see screenshot):
Would love to port my pet project to 4.x. :)
Something like XAML for GTK would be nice.
https://blogs.gnome.org/christopherdavis/2020/11/19/glade-no...
I have used GTK several times, but Qt always felt far more pleasant. Plus Qt applications work well on Windows and macOS, whereas GTK renders extremely slowly on macOS and looks and feels very non-native on Windows and macOS.
> . If you need to mock something up, you can try sketching on a piece of paper or using our mockup resources.
Linux GUI is honestly in a bizarre state. And the Gnome team seems to keeping on recommending against the tools they developed themselves (Vala...). Seems like QT is the best alternative...
More importantly, this sort of code is incredibly simple and linear with virtually no logic or state, this is the worst sort of code to try and code golf into something more "elegant", you just end up with something more complicated but less flexible.
https://www.youtube.com/watch?v=gGZyVSOnqm0
The tl;dw: Kernel guys made a scuba diving app, using C + GTK. They switched to C++ and QT, due to issues/poor quality of GTK, bad attitude by GTK. QT also fixed a lot of complaints they had about C++. Also QT looks like native application on other platforms.
It's not. GTK3/4 apps look like GTK apps on every platform and don't even try to fit in.
In Windows i also disable antialiasing since i do not like the blurry look but i also force fonts in web sites with good hinting since most sites look horrible with their preferred fonts.
Here is a "normal" system looks like https://imgur.com/a/hvKNWIs
Everything that isn't a terminal or VSCode on those screenshots is GTK3.
Everything has the same color scheme, icons, fonts. Qt included.
Others have meanwhile clarified that anti-aliasing wasn't enabled in the examples, which is easy enough to do and is in all production code. Not sure, whether the author had some retro-look effect in mind or just wanted to visually emphasize the examples (he sure succeeded in both).