[PyQt] property support?

Diez B. Roggisch deets at web.de
Fri Aug 17 18:33:02 BST 2007

Phil Thompson schrieb:
> On Friday 17 August 2007, Diez B. Roggisch wrote:
>> Hi,
>> is there any existing or planned property-support? I've got a class that
>> essentially looks like this:
>> class Foo {
>> public:
>>     SomeType Name[Size];
>> };
>> So the Name-property is part of the public API. I'd like to access that
>> using
>> foo_instance.Name
>> instead of introducing a getter/setter-pair. Any suggestions?
> http://www.riverbankcomputing.com/Docs/sip4/sipref.html#getcode

Great. I searched the docs for "property", but that wasn't mentioned 
around %GetCode/%SetCode.

However utilizing it, I stumbled over the following error:

sip: irr::video::SMaterial::TextureWrap has an unsupported type

The declaration looks like this (for now I don't care about setting, but 
I stubbed it to make sure that's not the problem cause)

       //! Texture Clamp Mode
       irr::video::E_TEXTURE_CLAMP *TextureWrap;
if(sipCpp && *sipCpp) {
   sipPy = PyTuple_New(MATERIAL_MAX_TEXTURES);
   irr::video::E_TEXTURE_CLAMP *tw = *(irr::video::E_TEXTURE_CLAMP 
   const enumType *sipFindMappedType("irr::video::E_TEXTURE_CLAMP");
   for(int i = 0; i < MATERIAL_MAX_TEXTURES; i++) {
     PyTuple_SetItem(sipPy, sipConvertFromNamedEnum(tw[i], enumType));
  } else {
   sipPy = Py_None;
sipCpp = 0;

E_TEXTUR_CLAMP is your run-off-the-mill enumeration type. Any 
suggestions why that fails?



More information about the PyQt mailing list