Making typedef available in python module with SIP

Marian Thomsen at
Mon Apr 12 10:35:13 BST 2021


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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the PyQt mailing list