Making typedef available in python module with SIP

Marian Thomsen marian.th at outlook.de
Mon Apr 12 10:35:13 BST 2021


Hello,

how can I make a typedef available in python module with SIP?

I imagine it is simple but I cannot find a way to access test2 from my python module. Renaming it using /PyName=test2/ in test1 would be possible but is not what I want because I couldn't access test1 anymore.

The following code is in my c++ header file:

struct test1 : public other_struct {
...
};

typedef test1 test2;

I can access test1, but how to wrap test2 that I can use test1 and test2 in Python I do not know.

(I get: AttributeError: module 'test' has noc attribute 'test2')

Thank you!

M.T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210412/48c2ca2c/attachment.htm>


More information about the PyQt mailing list