[PyQt] Understanding PyQt Documentation (Chris O'Halloran)
lloyd konneker
bootch at nc.rr.com
Fri Sep 20 16:36:49 BST 2013
'parent = None' in Python means: a keyword argument, keyword is
'parent', default value is None. (That's basic knowledge of Python.)
But note that the PyQt documentation requires a little more
interpretation because: it is automatically derived from the C++ Qt
documentation. Thus 'QWidget parent = None' must be interpreted as "the
type of the argument must be QWidget.' In Python, you don't declare
types of arguments, 'QWidget' is a carryover from the C++ documentation.
Also the PyQt documentation is sometimes manually augmented: the
business about 'PyQt owning' is augmentation. It's not obvious what
sentences of the documentation are augmented from the C++ documentation.
So I usually consult both the C++ and the PyQt documentation.
More information about the PyQt
mailing list