QXlsx
QXlsx copied to clipboard
about the image insert the excel.
hi. when i insert the img, i can't insert the img by QPoint. because the excel calculates with pound and Qt inserts the img with pixel. then i try to transform the lb to pixel. it looks successful. but when i insert many imgs on vertical. The coordinate error is becoming more and more obvious.
Dear @LiuLikeQian
Thanks for reporting.
Can I see the example code you tested?
Me or others may be able to help you.
bool Worksheet::insertImageEx(QPoint star, QSize size, const QImage &image) { Q_D(Worksheet);
if (image.isNull())
return false;
if (!d->drawing)
d->drawing = QSharedPointer<Drawing>(new Drawing(this, F_NewFromScratch));
DrawingAbsoluteAnchor *anchor = new DrawingAbsoluteAnchor(d->drawing.data(), DrawingAnchor::Picture);
anchor->pos = star * 9525;
anchor->ext = size * 9525;
anchor->setObjectPicture(image);
return true;
}
@j2doll thanks