[PyQt] how to wrap anonymous enums

Phil Thompson phil at riverbankcomputing.com
Sat Aug 29 18:24:35 BST 2009


On Sat, 29 Aug 2009 17:48:11 +0200, "Diez B. Roggisch" <deets at web.de>
wrote:
> Hi,
> 
> I've got a struct like this:
> 
> struct SJoystickInfo {
> 	u8				Joystick;
> 	u32				Buttons;
> 	u32				Axes;
> 	enum
> 	{
> 		//! A hat is definitely present.
> 		POV_HAT_PRESENT,
> 
> 		//! A hat is definitely not present.
> 		POV_HAT_ABSENT,
> 
> 		//! The presence or absence of a hat cannot be determined.
> 		POV_HAT_UNKNOWN
> 	} PovHat;
> }; // struct SJoystickInfo
> 
> So the type of PovHat is an anonymous enum. How to wrap that? I also 
> tried to just give PovHat an int-value, but that didn't work either.

It should just work - what problem are you seeing?

Phil


More information about the PyQt mailing list