[PyQt] sip: unsupported cast operator

Phil Thompson phil at riverbankcomputing.com
Sun May 15 14:18:52 BST 2011


On Sun, 8 May 2011 13:49:24 -0700 (PDT), pymab <mabxsi at hotmail.com> wrote:
> Hi,
> 
> sip gives me an unssuported error for a 'signed char' cast operator:
> 
> "sip: xsi_value.sip:428: Unsupported operator cast"
> 
> class CValue
> {
> %TypeHeaderCode
> #include "xsi_value.h"
> %End
> 
> public:
> ...
> operator signed char () const;
> ...
> };
> 
> Is it a limitation or it's by design ?

There is no Python equivalent.

> What would be the workaround if any ?

Use the int() cast instead.

Phil


More information about the PyQt mailing list