5 ms·
I tried to learn GTK a few years ago, because I wanted to create an app that was fast, snappy and looked "native" on Linux. But I was unable to find informatio
by diego_sandoval 3y ago
I tried to learn GTK a few years ago, because I wanted to create an app that was fast, snappy and looked "native" on Linux.
But I was unable to find information about how to set up my repo and build process with GTK vendored into the project. All tutorials said that I should just install GTK libraries with my system package manager, but that was not a satisfactory answer for me.
After some hours
fiddling around stackoverflow, adding flags to my GCC invocation and being unable to solve the problem, I just gave up.
Flutter Desktop seems like a compelling alternative to GTK these days.
- cies 3y agoFlutter is cool, and new. Qt is old, and cool.
- mirpa 3y agoAdding flags to gcc should be just a matter of pkg-config. In bindings to high level languages that should be handled automatically.
- audidude 3y ago> Flutter Desktop seems like a compelling alternative to GTK these days. Sad news for ya, flutter just wraps GDK (from GTK) on Linux. It also, last time I checked, was limited to a single application window.
- fngjdflmdflg 3y agoIt just uses GTK to open a window. Firefox and webkit also do this IIRC.
- TingPing 3y agoWebKitGTK has a lot of integration with the toolkit.
- audidude 3y agoDescribe "just"? How about input events? How about vsync synchronization? How about monitor information? How about clipboard? How about drag'n'drop? GDK does an awful lot of lifting for Just here.
- fngjdflmdflg 3y agoThat's a good point. I just meant that it is not "just" GTK to the extent that it would invalidate the claim that it is "a compelling alternative to GTK these days."
- diego_sandoval 3y agoI have no issue with it using GTK under the hood, as long as it doesn't inherit the philosophy of "dependencies are installed using your system package manager" to the degree that GTK does. Another thing I would like to avoid is the philosophy of "the application binary doesn't come with its dependencies bundled, the user should install them using the system package manager". Unfortunately, many frameworks have this philosophy but, apparently, Flutter doesn't.
- asddubs 3y agoqt is a good fit for writing native linux apps. I've tried both and qt is much nicer to work with (in my opinion)
- foresto 3y agoI find that Qt apps also feel native on a wider variety of linux desktops than Gtk apps do. For example, Gtk (since v3 I think) encourages apps to override the window manager, stuffing widgets into the title bar and breaking actions like window shading/collapsing. In general, Qt acknowledges the differences between desktop styles and tries to match them, while Gtk doesn't seem to care about any style or interaction model other than its own.