[PyQt] PyQt documentation where PyQt function is not same as Qt C++ function

Barry barry at barrys-emacs.org
Tue Nov 28 20:06:25 GMT 2017

> On 28 Nov 2017, at 15:53, David Boddie <david at boddie.org.uk>
> I should clarify that the "const QString &" pattern in signatures appears
> all over the place in Qt and is used for reasons I can't remember, but
> probably something to do with getting old C++ compilers to generate
> efficient code.

The reason is that foo &x means that x is not optional.
Where as foo *x can optional by passing as null.

A const foo &x must be present and cannot be modified.
A foo &x can be modified and you should be assume it will be modified.


More information about the PyQt mailing list