SIP - set slots directly?
Phil Thompson
phil at riverbankcomputing.com
Fri Jan 24 11:38:19 GMT 2025
On 23/01/2025 15:41, Scott Talbert wrote:
> Is there a way to set a slot's function directly with SIP?
>
> For example, if I wanted to just set an iterator object type's tp_iter
> slot to PyObject_SelfIter?
>
> Thanks,
> Scott
Defining a method called __iter__() with the correct signature should do
it. It will set the slot to a SIP generated function that will call your
implementation.
See https://python-sip.readthedocs.io/en/stable/specification_files.html
Phil
More information about the PyQt
mailing list