[PyQt] why use the non-gui Qt classes in Python

Kyle Altendorf sda at fstab.net
Sat Aug 18 04:10:56 BST 2018



On August 17, 2018 8:18:41 PM EDT, Christopher Probst <christop.probst at gmail.com> wrote:
>These are really great responses. Thank-you so much.
>
>In general, I personally take the non-Qt option unless Qt offers a
>specific
>> benefit. I'm much more likely to want to leverage my existing code or
>> library knowledge without Qt than without Python.
>
>
>I must ask: Why beyond the reason of expanding library knowledge would
>you
>prefer the non-Qt option? Are there technical reasons like performance,
>reliability or maintainability?

They'll be more 'pythonic' generally.  You'll get exceptions, iterables instead of getWidgetByIndex() functions, yield/await sequencing, etc. Sure, also easier to contribute to a Python native library in various regards, I'd expect.  The libraries will be in common use because they are good on their own instead of because they happen to already be present as part of a big system ( in other words Qt, though the same idea applies to not considering stdlib modules inherently better than third party).  I'm not saying I'm against Qt stuff, just that I have a tendency away when there are good options.  Oh, and you are less likely to lose PyPy as an alternative to CPython when you want to use the same library without PyQt.  :]

Cheers,
-kyle


More information about the PyQt mailing list