Hi all!

I want to use type safe enumeration like in C++11
Qt Code:
  1. enum class Fruit
  2. {
  3. apple,
  4. orange,
  5. pear
  6. }
To copy to clipboard, switch view to plain text mode 
and use it in more (then one) classes
Qt Code:
  1. class FruitCake
  2. {
  3. Fruit baseFruit; //use: baseFruit = Fruit::apple;
  4. }
  5. class Person
  6. {
  7. Fruit favoriteFruit; //use: favoriteFruit = Fruit::apple;
  8. }
  9.  
  10. if(john.favoriteFruit == myCake.baseFruit)
  11. john.eat(myCake)
To copy to clipboard, switch view to plain text mode 
OK, this can be done easily. But I want all the goodies that Q_ENUMS provides (The meta data of enum).
How can i do that?

Sorry for non-imaginative example