5 ms·
I've been using a lot of Python GTK via gobject introspection lately. It works fine, or at least a well as GTK ever works. Why would I want to switch to Qt? 1)
by quotemstr 8y ago
I've been using a lot of Python GTK via gobject introspection lately. It works fine, or at least a well as GTK ever works. Why would I want to switch to Qt?
1) I like how GTK and Python object lifetime tracking are compatible (both are simply reference counted), where as Qt has this hierarchical model that feels weird in Python and that led to random segfaults when I tried using PyQt for a serious project last year.
2) gobject introspection works with a variety of different bindings and libraries and provides an object model extensible in any language. Last time I looked at Qt bindings, they looked more like pre-gobject-introspection Python GTK bindings, meaning they were fixed-function and frequently left out some functionality. With gobject, all language bindings are first-class citizens.
- rapsey 8y ago> Why would I want to switch to Qt? Because GTK is awful outside of Linux.
- quotemstr 8y agoIs it? Why? Works fine for me.
- rhodysurf 8y agoFunctionaly it is fine, but its sure doesnt look native on Mac OS or Windows. Qt looks at least a magnitude better (more native) on those platforms
- cpburns2009 8y agoI'd argue GTK is awful inside of Linux because of client-side decorations (removal of the standard title-bar) that you cannot disable, removal of the menu bar, and the mobile/tablet first design (some people do use desktops and I'm not allergic to text).
- deleted 8y ago[deleted]
- solarkraft 8y ago> that you cannot disable I'm pretty sure you can. I like them in most cases, though, just wish they'd gone the Windows/MacOS way of slowly intruding/overlapping a bit occasionally instead of reinventing the whole bar.
- ptx 8y agoHow does the reference counting work in the presence of reference cycles involving both the GTK side and the Python side, e.g. an event handler having a reference to an object that has a reference to the object the handler is attached to? Do they get collected properly, like they would with pure Python objects, or would you have to break up the cycle?