在 PyQt4 中,有什么替代方法:
class TestClass
{
public:
enum Option {
OptionA = 0x0, // 0x000000
OptionB = 0x1, // 0x000001
OptionC = 0x2, // 0x000010
OptionD = 0x4, // 0x000100
OptionE = 0x8, // 0x001000
OptionE = 0x10 // 0x010000
// ... some more options with value which is a power of two
};
Q_DECLARE_FLAGS(Options, Option)
};
Q_DECLARE_OPERATORS_FOR_FLAGS(TestClass::Options)
如何将此块转换为python?