Hi.
As I understand it, I need Q_OBJECT macro if I declare a class that should use signals and slots, and it should then also be derived from QObject?
Like
Qt Code:
  1. class Foo:public QObject{
  2. Q_OBJECT
  3. // etc.
  4. }
To copy to clipboard, switch view to plain text mode 

But if I derive from a class that already is derived from a QObject, like
Qt Code:
  1. class MainWindow : public QMainWindow
  2. {
  3. Q_OBJECT
  4. public:
  5. MainWindow(QWidget * parent = 0);
  6. private:
  7. Ui::MainWindow ui;
  8. };
To copy to clipboard, switch view to plain text mode 

Is Q_OBJECT really needed here? I mean, there is nothing that uses signals/slots, the MainWindow constructor contains no signals emits or connects.
I mean, the QMainWindow class is derived from QObject, doesn't it get the Q_OBJECT for that part?