Function modifications consist of a list of
modify-argumentnodes contained in a modify-function node. Use the remove-argument, replace-default-expression, remove-default-expression, replace-type, reference-count and define-ownership nodes to specify the details of the modification.<modify-function> <modify-argument index="return | this | 1 ..." rename="..." invalidate-after-use = "true | false" pyi-type="..."> // modifications </modify-argument> </modify-function>
indexattribute to “1” for the first argument, “2” for the second one and so on. Alternatively, set it to “return” or “this” if you want to modify the function’s return value or the object the function is called upon, respectively.
renameattribute is used to rename a argument and use this new name in the generated code.
pyi-typeattribute specifies the type to appear in the signature strings and
.pyifiles. The type string is determined by checking this attribute value, the replace-type modification and the C++ type. The attribute can be used for example to enclose a pointer return value within
Optionalto indicate that
For the optional
invalidate-after-useattribute, see Invalidation after use .
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.