@@ -113,9 +113,8 void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt | |||||
113 | Q_UNUSED(widget) |
|
113 | Q_UNUSED(widget) | |
114 | Q_UNUSED(option) |
|
114 | Q_UNUSED(option) | |
115 |
|
115 | |||
116 |
|
116 | painter->save(); | ||
117 | painter->setPen(m_linePen); |
|
117 | painter->setPen(m_linePen); | |
118 |
|
||||
119 | painter->setBrush(m_linePen.color()); |
|
118 | painter->setBrush(m_linePen.color()); | |
120 | painter->setClipRect(clipRect()); |
|
119 | painter->setClipRect(clipRect()); | |
121 |
|
120 | |||
@@ -126,6 +125,7 void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt | |||||
126 | for (int i(1); i < m_points.size();i++) |
|
125 | for (int i(1); i < m_points.size();i++) | |
127 | painter->drawLine(m_points.at(i-1), m_points.at(i)); |
|
126 | painter->drawLine(m_points.at(i-1), m_points.at(i)); | |
128 | } |
|
127 | } | |
|
128 | painter->restore(); | |||
129 | } |
|
129 | } | |
130 |
|
130 | |||
131 | void LineChartItem::mousePressEvent(QGraphicsSceneMouseEvent *event) |
|
131 | void LineChartItem::mousePressEvent(QGraphicsSceneMouseEvent *event) |
General Comments 0
You need to be logged in to leave comments.
Login now