Hi everybody!

I'm new in this forum and I hope you can help me.

I would like to draw a 3d pie slice with QPainterPath. See the SourceCode.

Qt Code:
  1. QPainter paint(this);
  2.  
  3. paint.setRenderHint(QPainter::Antialiasing,true);
  4. paint.translate(width()/2, height()/2);
  5.  
  6. paint.setBrush(QColor(0,255,0,127));
  7.  
  8. QPainterPath paint4;
  9.  
  10. paint4.setFillRule(Qt::WindingFill);
  11. paint4.moveTo(300,150);
  12. paint4.arcTo(0,0,600,300,10,45);
  13. paint4.lineTo(300,150);
  14.  
  15.  
  16. paint4.lineTo(300,180);
  17. paint4.arcTo(0,30,600,300,10,45);
  18. paint4.lineTo(300,180);
  19.  
  20.  
  21. int xw2 = 300 * cos(55*(M_PI/180));
  22. int yw2 = -150 * sin(55*(M_PI/180));
  23. xw2+=300;
  24. yw2+=150;
  25.  
  26. QPainterPath paint5;
  27. paint5.moveTo(xw2,yw2);
  28. paint5.lineTo(xw2,yw2+30);
  29. paint4.addPath(paint5);
  30.  
  31.  
  32. int xw = 300 * cos(10*(M_PI/180));
  33. int yw = -150 * sin(10*(M_PI/180));
  34. xw+=300;
  35. yw+=150;
  36.  
  37. QPainterPath paint6;
  38.  
  39. paint6.moveTo(xw,yw);
  40. paint6.lineTo(xw,yw+30);
  41. paint4.addPath(paint6);
  42.  
  43.  
  44. paint.drawPath(paint4);
To copy to clipboard, switch view to plain text mode 

Unfortunately, I can't fill the sides of the pie slice with the given color.

Thank you for your help in advance.