Skip to content

KJSEmbed now supports enums!

Thursday, 28 August 2003  |  rich

I've just committed some basic support for enums to kjsembed. This means that enums published by QObjects using the Q_ENUM declaration can be used by scripts. At the moment, the constants are properties of the proxy object itself rather than the class, but the basics are there.

This means that scripts can now do things like:

     f = new QFrame();
     f.frameShape = f.WinPanel | f.Sunken;

instead of needing to use the int values of the enum. As you can see the enum constants can be or'd together just as they are in C++.