title: QPainterPath closing a curve subpath at end point
body: <p>I have a problem with <code>QPainterPath</code> because when I do this:</p>
  
  <pre><code>QPainterPath path(start);
  path.quadTo(control, end);
  
  QPainter painter;
  painter.setBrush(Qt::black);
  painter.drawPath(path);
  </code></pre>
  
  <p>it draws the area beneath the curve black as well. Using <code>QPainterPath::closeSubpath()</code> nor <code>QPainterPath::moveTo(start)</code> helps. The only thing that does help is drawing the curve back to beginning which is silly and with antialiasing on looks bad.</p>
  
  <p>But this is not just a visual issue. I use the same code for QGraphicsItem::shape() and it actually causes the item's shape to include the area beneath the curve which is undesirable.</p>
  
  <p><strong>Current (with above code)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/rs2Y5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rs2Y5.png" alt="enter image description here"></a></p>
  
  <p><strong>Desired</strong> (produced with <code>QPainerPath::quadTo(control, start)</code>)</p>
  
  <p><a href="https://i.stack.imgur.com/6kFip.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6kFip.png" alt="enter image description here"></a></p>
  
  <p>Notice the bad edges of the desired curve due to <code>QPainter</code> drawing it twice - once from each direction.</p>
  
  <p>What am I doing wrong here?</p>