Re:PyQt5 Tutorial: Create a Python GUI in 2018
by ptx on Tuesday September 25, 2018 @05:36PM
(#18070704)
How 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?
Re:PyQt5 Tutorial: Create a Python GUI in 2018
by rapsey on Tuesday September 25, 2018 @01:07PM
(#18068218)
> Why would I want to switch to Qt?
Because GTK is awful outside of Linux.
Re:PyQt5 Tutorial: Create a Python GUI in 2018
by cpburns2009 on Tuesday September 25, 2018 @01:13PM
(#18068280)
I'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).
Re:PyQt5 Tutorial: Create a Python GUI in 2018
by solarkraft on Tuesday September 25, 2018 @01:30PM
(#18068460)
> 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.
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.