Live data from Hacker News

How Does One Create A Gtk+ Application?

blogs.gnome.org

31–40 of 103 posts

Re: How Does One Create A Gtk+ Application?

#31
post #28
post #17

It's unfortunate that Linux and/or Linux distributions have not yet solved the problem of supporting parallel versions of dependencies. Even Node's package manager supports that. The end result is that rolling release distros break stuff often, as applications can't be tested and executed in isolation of each other. The "solution" to this is releasing everything every 6 months, when you can actually test everything t…

> Even Node's package manager supports [parallel versions of dependencies] I feel like your emphasis is backwards. It's not surprising that NodeJS, a new project, has solved some of these problems. NPM has the luxury of decades of experience from dozens of linux package managers and package managers from other languages. Plus, they're not tied to the legacy use cases the same way that (e.g.) apt is.

I don't think it's surprising either, I just hope that Linux will solve the problem too. I guess I used the 'even' rhetoric because if Node could solve it, Linux (a much larger and better financed software ecosystem) should too.

Re: How Does One Create A Gtk+ Application?

#32

even though Qt might and wxwidgets might be better(wxwidgets is really more a wrapper to different gui backends), IMHO linux lacks a proper gui toolkit. creating gui applications is much better in both windows in osx. Cocoa was a fairly well designed base api that gradually got improved. (yeah, there is a lot of valid criticism here too, but we're comparing it to gtk in this case) We should build something that can g…

How is Qt not a proper GUI toolkit exactly?

Re: How Does One Create A Gtk+ Application?

#33
post #17

It's unfortunate that Linux and/or Linux distributions have not yet solved the problem of supporting parallel versions of dependencies. Even Node's package manager supports that. The end result is that rolling release distros break stuff often, as applications can't be tested and executed in isolation of each other. The "solution" to this is releasing everything every 6 months, when you can actually test everything t…

Some Linux distributions have no problems with multiple versions of parallel dependencies. Gentoo, for example.

Re: How Does One Create A Gtk+ Application?

#34

even though Qt might and wxwidgets might be better(wxwidgets is really more a wrapper to different gui backends), IMHO linux lacks a proper gui toolkit. creating gui applications is much better in both windows in osx. Cocoa was a fairly well designed base api that gradually got improved. (yeah, there is a lot of valid criticism here too, but we're comparing it to gtk in this case) We should build something that can g…

I just hope in this growing on the adoption of Qt. In the long term it may automatically become the standard gui toolkit for linux

Re: How Does One Create A Gtk+ Application?

#35
Folk who want to develop cross platform software GUI software should use Lazarus. It works on Linux, Windows and OS/X. Getting started can be dicey, what once you are up and running it simply works. The LCL doesn't use the latest Qt5 or Gtk3, but it just works.

Linux guys should stuff faffing about with endless compile times in C++, buffer overruns and pointer exceptions. They should use FreePascal and Lazarus and retain their sanity.

Re: How Does One Create A Gtk+ Application?

#36
post #12

This state of Gtk sad, but I'm really glad we (VLC) moved to Qt, a few years ago (2006), before many applications did the switch, and when it was an unpopular move. Before that time, we were using WxWidgets and had many issues, notably with Unicode and Windows support. WxWidget APIs and behaviors were changing too much between releases (even minor ones). When we moved, we were in the early Qt 4.1/4.2 days, and most V…

I remember when Gtk 2.0 came out. IIRC, at the time, Qt seemed to be bloated and slow compared to Gtk, but Gtk had a lot of breaking changes and was more work to program with. I was unimpressed with having to constantly figure out how to update my Gentoo system when Gtk kept moving functions from one library to another, which required hacking in symlinks to point to new libraries that programs required. It was a real pain in the ass and I finally moved onto Ubuntu. Gentoo had its own probs, but Gtk didn't help.

Re: How Does One Create A Gtk+ Application?

#37
post #18
post #14

Earlier quoted context omitted.

I feel really conflicted about Qt. On one hand, as a graphical toolkit/environment, it's great. It's well-structured and easy to use, and QML is basically everything web applications should have been. On the other hand, as a C++ library it really couldn't be worse, with its flagrant reinvention of the standard library, pervasive UTF16, complex object hierarchies, raw pointers, extensive use of macros, etc., etc. Mayb…

How would people feel about a cleanup-focused API-compatible fork of Qt, in the style of LibReSSL?

It would be stupid and pointless? The Qt Project is an incredibly open environment. You want cleanups, go and file some PRs.

WTF is it with people's first instinct being "let's fork instead of contributing fixes"?

Re: How Does One Create A Gtk+ Application?

#38

This post was written by Morten Welinder, the author of Gnumeric and a popular GNOME blogger. I feel really bad for GTK developers. The GNOME guys have clearly taken the toolkit from a "general purpose" direction to a much more gnome-centric one. At the same time though, I can't help but be hopeful for the future. Qt is a wonderful project, with a bunch of wonderful licenses, developed in a wonderfully-open environme…

I've always preferred Gtkmm over Qt. That might be because Gtk+ (and Gtkmm) doesn't try to be an "everything, including the kitchen sink" library (and, in related news, I've never been a fan of the Gnome API -- even though I was a fan of the Gnome desktop until Gnome 3). However, it's always seemed a little perverse to me to have Gtk+ try to imitate '90s-style C++ in C, and then to use a C++ wrapper around that.

> doesn't try to be an "everything, including the kitchen sink"

Qt5 and its modularity is the answer to your concern. If you don't want everything including QtKitchenSink, you can limit yourself to QtCore.

Re: How Does One Create A Gtk+ Application?

#39

If you need GTK for something, really, don't bother. It's a bag of hurt. Qt, WxWidgets, or even something else. I'm so glad the Web and Modern Browsers reinvented "desktop applications".

I actually like writing GTK way more then Qt. I like the fact it is C and easily integrates with any language I wish to use. Though I use Qt, the Mac support on GTK is terrible at best. Windows support is even worse (or non-existent) which makes me question their "cross platform gui" title. If I was to suggest a method, I would suggest using each platforms GUI language and make a backend in something cross platform.

GTK runs on Linux with X11, Wayland, and probably even some BSDs. Technically that qualifies as cross-platform.

Re: How Does One Create A Gtk+ Application?

#40
post #14

Earlier quoted context omitted.

I feel really conflicted about Qt. On one hand, as a graphical toolkit/environment, it's great. It's well-structured and easy to use, and QML is basically everything web applications should have been. On the other hand, as a C++ library it really couldn't be worse, with its flagrant reinvention of the standard library, pervasive UTF16, complex object hierarchies, raw pointers, extensive use of macros, etc., etc. Mayb…

I really like the Qt syntax. It's well though out, readable, I can overlook it without years of study and it has a good documentation. I think it helps to not think about it as C++ at all, because it isn't really. It's a syntax subset of C++ with a few extensions and it's own standard library that happens to use a C++ compiler somewhere down the toolchain. I don't see the issue with the object hierarchies either. You…

Totally agree. After studying C++, I was wary of trying to use the language. It seemed to me that you'll get into trouble quickly and it requires years of experience to become an expert. I would rather use Qt because it insulates you from many of the pitfalls of C++. I especially like the slots and signals paradigm. I know there are libraries that do the same thing, but if you stay within the Qt framework, you'll be a lot more productive.
Post reply on HN