Re: [SIP] SIP_PYCALLABLE in constructor
Sandro Mani <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <[email protected]> |
On 31.10.19 11:13, Phil Thompson wrote: > On 31/10/2019 09:22, Sandro Mani wrote: >> Hi >> >> I'm trying to create bindings for a class Foo with a constructor >> taking a std::function, so basically for >> >> typedef std::function<Item*()> ItemFactory; >> Foo( ItemFactory factory, QObject* parent = 0 ); >> >> in the sip file I'm writing >> >> Foo( SIP_PYCALLABLE factory, QObject *parent = 0 ); > > You haven't told SIP what the C++ signature is. You need to do this > for ctors, virtuals and protected methods. Something like... > > Foo(SIP_PYCALLABLE factory, QObject *parent = 0) [(ItemFactory, > QObject *)]; > Many thanks! Sandro _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt