Default argument for QApplication?
Florian Bruhin
me at the-compiler.org
Fri Aug 27 12:20:14 BST 2021
Hi,
PyQt requires passing sys.argv (or [] for quick tests) to QApplication,
probably because Qt in C++ requires passing argc/argv.
I recently noticed that PySide (both 2 and 6) doesn't require that, and
defaults to sys.argv when no argument is given. While a [] is only two
characters, sometimes even for quick test scripts it'd be good to pass
custom arguments to Qt, and an "import sys" and passing "sys.argv" is a
bit more typing :)
Maybe PyQt should default to sys.argv as well? Or do you prefer
"explicit is better than implicit" here?
Florian
--
me at the-compiler.org | https://www.qutebrowser.org
https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210827/45b5e4a5/attachment.sig>
More information about the PyQt
mailing list