title: What is the correct way of Multiple inheritance in Qt/C++?
body: <p>In my Qt application, I have a base class as follow. I am using <code>QObject</code> because I want to use Signal-Slot mechanism in all derived classes.</p>
  
  <pre><code>class IRzPlugin : public QObject {
  
  public:
    virtual void registerMenu(QWidget*);
    virtual void execute();
  }
  </code></pre>
  
  <p>Then I have another class as follow. I need to extend from <code>QWidget</code> because I need to implement event handling methods in all derived classes (such as <code>mouseMoveEvent()</code>, <code>keyPressEvent()</code> and others).</p>
  
  <pre><code>class IRzLayeringPlugin : public IRzPlugin , public QWidget{
  
  }
  </code></pre>
  
  <p>But compiler gives these the errors:</p>
  
  <pre><code>C:\svn\osaka3d\tags\iter08\prototype\osaka3d\rinzo\plugin\moc_IRzLayeringPlugin.cxx: In member function `virtual const QMetaObject* IRzLayeringPlugin::metaObject() const':
  C:\svn\osaka3d\tags\iter08\prototype\osaka3d\rinzo\plugin\moc_IRzLayeringPlugin.cxx:51: error: `QObject' is an ambiguous base of `IRzLayeringPlugin'
  C:\svn\osaka3d\tags\iter08\prototype\osaka3d\rinzo\plugin\moc_IRzLayeringPlugin.cxx:51: error: `QObject' is an ambiguous base of `IRzLayeringPlugin'
  make[2]: *** [CMakeFiles/Rinzo.dir/plugin/moc_IRzLayeringPlugin.cxx.obj] Error 1
  </code></pre>