shlogg · Early preview
Wang Fei @wangfei1008

QCustomplot Tracer For 2D Image

QCustomplot used to draw tracer on 2D image, but not for drawing lines. VarCurveTracer class helps create a tracker with customizable style and size.

By using QCustomplot to draw a tracer on a 2D image, it is possible to draw a single QCPAxisRect.
If using QCPItemStraightLine to draw lines, it is not possible to draw all rows and columns successfully. I hope a skilled technician can provide guidance.

VarCurveTracer::VarCurveTracer(QCustomPlot* customplot, QCPAxisRect* rect, QCPGraph* graph, QColor color, QObject* parent) 
    :QObject(parent)
    ,m_customplot(customplot)
    ,m_rect(rect)
    ,m_graph(graph)
{
    if (!m_customplot) {
        qDebug() << "m_customplot is null.";
        return;
    }
    // 新建跟踪器
    m_tracer = new Q...