My first post here!

I am a newbie to Qt and quite newbie to C++. What I am trying to do is to subclass QStringList, but I don't make it. This is what I have tried out so far:

Qt Code:
  1. class MyStringList : public QStringList
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. MyStringList();
  7.  
  8.  
  9. protected:
  10. int numbers_pos[100];
  11.  
  12. public Q_SLOTS:
  13. void set_number(int pos, int line_number);
  14. int get_number(int pos);
  15. };
To copy to clipboard, switch view to plain text mode 

I'm getting errors that:
Qt Code:
  1. error: invalid static_cast from type 'QObject*' to type 'MyStringList*'
To copy to clipboard, switch view to plain text mode 
and I am quite sure that it has to do with the Q_OBJECT macro. However, it does not let me remove it.

Any guesses?

Thanks a lot !