--- a/QTfrontend/ui/page/pagegamestats.cpp Wed Jan 24 22:20:10 2018 +0100
+++ b/QTfrontend/ui/page/pagegamestats.cpp Sat Mar 10 23:16:22 2018 +0100
@@ -78,6 +78,7 @@
gbl->addWidget(graphic);
graphic->scale(1.0, -1.0);
graphic->setBackgroundBrush(QBrush(Qt::black));
+ graphic->setRenderHint(QPainter::Antialiasing, true);
labelGameWin = new QLabel(this);
labelGameWin->setTextFormat(Qt::RichText);
@@ -172,7 +173,8 @@
labelGraphTitle->hide();
graphic->hide();
} else {
- QGraphicsScene * scene = new QGraphicsScene();
+ graphic->setScene(Q_NULLPTR);
+ m_scene.reset(new QGraphicsScene(this));
QMap<quint32, QVector<quint32> >::const_iterator i = healthPoints.constBegin();
while (i != healthPoints.constEnd())
@@ -188,11 +190,15 @@
for(int t = 1; t < hps.size(); ++t)
path.lineTo(t, hps[t]);
- scene->addPath(path, QPen(c));
+ QPen pen(c);
+ pen.setWidth(2);
+ pen.setCosmetic(true);
+
+ m_scene->addPath(path, pen);
++i;
}
- graphic->setScene(scene);
+ graphic->setScene(m_scene.data());
graphic->fitInView(graphic->sceneRect());
}
}