@@ -30,6 +30,7 int main(int argc, char *argv[]) | |||||
30 | qDebug() << s->angle() << s->span() << s->percentage(); |
|
30 | qDebug() << s->angle() << s->span() << s->percentage(); | |
31 |
|
31 | |||
32 | QChartView* chartView = new QChartView(&window); |
|
32 | QChartView* chartView = new QChartView(&window); | |
|
33 | chartView->setRenderHint(QPainter::Antialiasing); | |||
33 | chartView->addSeries(series); |
|
34 | chartView->addSeries(series); | |
34 | chartView->setChartTitle("simple piechart"); |
|
35 | chartView->setChartTitle("simple piechart"); | |
35 | chartView->setChartTheme(QChart::ChartThemeIcy); |
|
36 | chartView->setChartTheme(QChart::ChartThemeIcy); |
@@ -49,7 +49,6 QPainterPath PieSlice::shape() const | |||||
49 |
|
49 | |||
50 | void PieSlice::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) |
|
50 | void PieSlice::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) | |
51 | { |
|
51 | { | |
52 | painter->setRenderHint(QPainter::Antialiasing); |
|
|||
53 | painter->setPen(m_pen); |
|
52 | painter->setPen(m_pen); | |
54 | painter->setBrush(m_brush); |
|
53 | painter->setBrush(m_brush); | |
55 | painter->drawPath(m_path); |
|
54 | painter->drawPath(m_path); |
@@ -18,8 +18,6 PieSliceLabel::PieSliceLabel(QGraphicsItem* parent) | |||||
18 |
|
18 | |||
19 | void PieSliceLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) |
|
19 | void PieSliceLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) | |
20 | { |
|
20 | { | |
21 | painter->setRenderHint(QPainter::Antialiasing); |
|
|||
22 |
|
||||
23 | painter->setPen(m_pen); |
|
21 | painter->setPen(m_pen); | |
24 | painter->drawPath(m_armPath); |
|
22 | painter->drawPath(m_armPath); | |
25 |
|
23 |
General Comments 0
You need to be logged in to leave comments.
Login now