I need to use macros to declare methods in my classes, some of which should be slots.
But MOC does not resolve macros, so I cannot simply put "public slots:" instead of "public:" declaration within the macro (see example below).

Is there a way of telling the MOC to create a slot from an already declared method?
An equivalent for hypothetical Q_DECLARE_SLOT macro in this (trivial) example:
Qt Code:
  1. #define MY_METHODS() \
  2. public: \
  3. int myMethod1( int a, int b ); \
  4. int myMethod2( int a, int b );
  5.  
  6.  
  7. class MyClass : public QObject
  8. {
  9. Q_OBJECT
  10. MY_METHODS();
  11. Q_DECLARE_SLOT( int myMethod1 int int ); // or something similar
  12. };
To copy to clipboard, switch view to plain text mode