Re: [SIP] SIP_PYCALLABLE in constructor

Phil Thompson <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
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 *)];

Phil
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.