ANN: Creating GUI Applications with wxPython

Michael Torrie torriem at
Wed Feb 27 14:16:36 EST 2019

On 02/27/2019 11:36 AM, Karsten Hilbert wrote:
> On Wed, Feb 27, 2019 at 10:38:25AM -0500, Dave wrote:
>> * GUI relatively easy to understand and implement.  easyGUI is truly easy in
>> all areas, but fails some of my other requirements.  The QT/PyQT/PySide2
>> situation is a mess - which one to use, why, any implementation differences,
>> etc.
> Python has been made a first-tier supported language in Qt
> just recently if I understood the news correctly. So, PySide2.

Except PySide2 doesn't yet support all of the core Qt class API, such as
QtSerialPort.  Of course there's PySerial in PyPi, but that's not
integrated with the Qt main loop.  So for me it's PyQt, but hoping
PySide2 will catch up eventually.  Other than missing bits, with a small
wrapper module I wrote, it's actually quite trivial to make code that
works without change on PyQt or PySide2.

So it's not the mess that Dave makes it out to be.  Back in PySide days,
I found a couple of occasions where references to C++ objects would be
dropped, causing segfaults.  This was due to an impedance mismatch
between Python and C++ in terms of references and object lifecycles.
Haven't encountered that in PySide2 though.

>> * Performance is very good.  Users hate to wait - for anything!
> That's rarely a concern in chosing a GUI toolkit.

Agreed. Waiting isn't because the UI doesn't have good performance. It's
because you blocked the main loop.  Learn how to work with your UI
framework's event loop and you won't have this problem.
>> * Lots of widgets!  I'll need a spreadsheet-like widget, a form widget to
>> enter information on parts, activities, etc., splash screen that the code
>> can talk to while the app is loading, and the big one - a cross-platform
>> printer widget that works with Windows and Mac/Unix/CUPS.  A network widget
>> may also be good.
> Usable built-in printer support (and "network widget would be
> good") takes wxPython out of the equation.

wxWidgets does seem to have a wide variety of third-party widgets for
doing all kinds of things like Dave wants, but how much of that is
exposed via Python wrappers?

> Karsten
> PS: Myself using wxPython, so no bashing there.

The future of Qt is QtQuick, and the advantage of it is that whatever
fancy visualization widgets come along, they will be exposed to all
language bindings without any special wrappers. The downside for me is
the heavy use of Javascript for UI logic and event handling.

More information about the Python-list mailing list