[PyQt] Overloaded functions with same Python signature

Phil Thompson phil at riverbankcomputing.com
Thu Jul 3 13:54:05 BST 2014


On 03/07/2014 1:19 pm, Camden Mannett wrote:
> SIP/PyQt5 is reporting an error during the parsing of my sip file:
> 
> __rshift__() has overloaded functions with the same Python signature
> 
> The offending functions are:
> 
> QDataStream& operator<<( QDataStream& stream,
>                          const Sy_loggerInterface::DebugLevel& obj );
> QDataStream& operator>>( QDataStream& stream,
>                          Sy_loggerInterface::DebugLevel& obj );
> 
> QDataStream& operator<<( QDataStream& stream,
>                          const Sy_loggerInterface::RotationMetric& obj 
> );
> QDataStream& operator>>( QDataStream& stream,
>                          Sy_loggerInterface::RotationMetric& obj );
> 
> Sy_loggerInterface::DebugLevel and Sy_loggerInterface::RotationMetric
> are enums, so they clearly don't have the same signature in C++. But I
> don't know what the created Python signature would look like.
> 
> Also note the left shift operators do not cause an error when I
> comment out one of the right shift ones, and simply changing the names
> of the parameters has no effect (as you would expect). Does anyone
> know what I can do to fix this error?

The only similar thing in PyQt applies /Constrained, In/ to the 
argument. However I'm not convinced it will do the right thing.

Phil


More information about the PyQt mailing list