QImage img(image.data,image.width,image.height,QImage::Format_RGB888);
QPainter painter((QPaintDevice*)&image);
QPen pen(Qt::red);
pen.setWidth(2);
painter.setPen(pen);
QRect rect(m_X-100, m_Y-100, 200, 200);
painter.drawRect(rect);
painter.end();
texture->setImage(image);
qt在QImage上绘制线框/十字标
于 2023-12-09 15:27:20 首次发布