QLine line(QPoint(100, 200), QPoint(150, 210));
QLine newLine = line.translated(20, 20);
qDebug() << "平移之前的坐标点:" << line;
qDebug() << "平移之后的坐标点:" << newLine;
平移之前的坐标点: QLine(QPoint(100,200),QPoint(150,210))
平移之后的坐标点: QLine(QPoint(120,220),QPoint(170,230))