I am using to store the points while drawing in graphics view. But when I try to add the line/point multiple times it does not get painted. The point gets stored but the painting is done only once. I have the constructed the signals to draw the things multiple times. Following is the code: point.cpp
void point::mousePressEvent(QGraphicsSceneMouseEvent *e)
{
if(e->button()==Qt::LeftButton) {
if(mClick){
x1 = e->pos().x();
y1 = e->pos().y();
mClick = false;
mPaintFlag = true;
update();
emit DrawFinished();//signal connected with the slot drawpoint() to paint the things mutiple times
}
//storage
_store.set_point(e->pos());
store_point.push_back(_store);
qDebug() << _store.getValue();
qDebug() << "Size of vector =" << store_point.size() << "and" << store_point.capacity();
update();
}