scribblearea.cpp
void ScribbleArea::mouseReleaseEvent(QMouseEvent *event)
{
    if (event->button() == Qt::LeftButton && isDrawing) {
        drawLineTo(event->pos());
        isDrawing = false;
    }
}
// If the button is released we set variables to stop drawing
If the button is released we set variables to stop drawing
If the button is released we set variables to stop drawing
void ScribbleArea::mouseReleaseEvent(QMouseEvent *event)
{
    if (event->button() == Qt::LeftButton && isDrawing) {
        drawLineTo(event->pos());
        isDrawing = false;
    }
}
void ScribbleArea :: mouseReleaseEvent ( QMouseEvent * event ) { if ( event -> button ( ) == Qt :: LeftButton && isDrawing ) { drawLineTo ( event -> pos ( ) ) ; isDrawing = false ; } }
If the button is released we set variables to stop drawing
If the button is released we set variables to stop drawing