title: Multiple inheritance in c++ (Qt example)
body: <p>I have a problem with multiple inheritance.</p>
  
  <p>I want a class IEdge to implement QGraphicsItem "interface", which contains boundindRect() and paint(...) abstract methods. IEdge also add some new methods.</p>
  
  <pre><code>class IEdge : public QGraphicsItem
  {
  public:
  virtual Vertex * getVertex1() = 0;
  virtual Vertex * getVertex2() = 0;
  }
  </code></pre>
  
  <p>Now I want to create UndirectedEdge, which extend IEdge, but i don't want to implement boundingRect() and paint(...) by myself, i want to use IQGraphicsLineItem implementation.</p>
  
  <pre><code>class UndirectedEdge : public IEdge, public IGraphicsLineItem
  {
  public:
  virtual Vertex* getVertex1();
  virtual Vertex* getVertex2();
  
  }
  </code></pre>
  
  <p>But that doesn't work, compiler says that UndirectedEdge is abstract because boundingRect() and paint(...) aren't implemented (but I'm sure that, IGraphicsLineItem contains these methods). I've no idea, why it doesn't work. Thank you very much for explanation.</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>I can solve this, but I'm only curious. In my primary language C# it would work, I'm missing something important about inheritance in C++ :-( ... some hint would be appreciated, thanks.</p>