Hello!

I want to create a class and nest it inside the unique other class that will be using it. This nested class is a QObject derived one, being a reimplementation of QVariantAnimation.

The problem is that when I put it inside my base class, the compiler states "error 1" after the message "Error: Meta object features not supported for nested classes".

Qt Code:
  1. class MessageFrame : public QFrame
  2. {
  3. Q_OBJECT
  4. Q_PROPERTY(QString currentText READ currentText WRITE setCurrentText)
  5. Q_ENUMS(Icon)
  6. Q_ENUMS(TextType)
  7.  
  8. class MessageFrameAnimator : public QVariantAnimation
  9. {
  10. Q_OBJECT
  11. public:
  12. MessageFrameAnimator(QObject* parent = 0) :
  13. QVariantAnimation(parent)
  14. {}
  15.  
  16. virtual ~MessageFrameAnimator() {}
  17.  
  18. protected:
  19. void updateCurrentValue(const QVariant & value) //Does nothing
  20. {
  21. Q_UNUSED(value);
  22. }
  23. };
  24.  
  25. public:
  26. //...
To copy to clipboard, switch view to plain text mode 

It's not imperative to use this class as a nested one, but I'm still curious how to solve this problem - if there is any solution to it. Does somebody knows how to nest my class correctly?

Thanks,

Momergil