Bases on this:
If you want to register an enum that is declared in another class, the enum must be fully qualified with the name of the class defining it. In addition, the class defining the enum has to inherit QObject as well as declare the enum using Q_ENUMS().
I'd say you need to add this:
Qt Code:
  1. class RELibOpt AnObject : public QObject {
  2. Q_OBJECT
  3. Q_ENUMS(RE::ReadingDirection) //<<----
  4. Q_PROPERTY (RE::ReadingDirection readingDirection READ readingDirection WRITE setReadingDirection)
  5. public:
  6. // Constructor.
  7. Q_INVOKABLE AnObject (QObject *p=0);
  8. // Accessors.
  9. RE::ReadingDirection const& readingDirection () const { return _readingDirection; }
  10. void setReadingDirection (RE::ReadingDirection const &v) { _readingDirection = v; }
  11. };
To copy to clipboard, switch view to plain text mode