title: Qt multiple inheritance and signals
body: <p>I'm having a problem with QT regarding multiple enheritance because of QObject. I know that a lot of others have the same problems but I don't know how I should fix it.</p>
  
  <pre><code>class NavigatableItem : public QObject
  {
      Q_OBJECT
  
      signals:
          void deselected();
          void selected();
          void activated();
  };
  
  class Button : public NavigatableItem, public QToolButton
  {
      Q_OBJECT
  
      ...
  }
  
  class MainMenuOption : public Button
  {
      Q_OBJECT
  
      ...
  }
  </code></pre>
  
  <p>When I do this</p>
  
  <pre><code>MainMenuOption* messages = new MainMenuOption();
  connect(messages, SIGNAL(selected()), SLOT(onMenuOptionSelected()))
  </code></pre>
  
  <p>I will get the error: </p>
  
  <blockquote>
    <p>QObject' is an ambiguous base of 'MainMenuOption'</p>
  </blockquote>
  
  <p>The reason why I let NavigatableItem enherit from QObject because of the signals. Is there a way to do this?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Adding virtual to each inheritence declaration, still gives me the same error:</p>
  
  <pre><code>class NavigatableItem : public virtual QObject
  
  class Button : public virtual NavigatableItem, public virtual QToolButton
  
  class MainMenuOption : public virtual Button
  </code></pre>
  
  <p>Even after a 'clean all', 'run qmake' and 'build all'.</p>