Code refactoring: Improve picture support
Don't lost picture information when edit existing .xlsx files
This commit is contained in:
@@ -6,12 +6,14 @@ int main(int argc, char** argv)
|
||||
QGuiApplication(argc, argv);
|
||||
|
||||
QXlsx::Document xlsx;
|
||||
|
||||
QImage image(400, 300, QImage::Format_RGB32);
|
||||
QImage image(40, 30, QImage::Format_RGB32);
|
||||
image.fill(Qt::green);
|
||||
xlsx.insertImage(5, 5, image);
|
||||
for (int i=0; i<10; ++i)
|
||||
xlsx.insertImage(10*i, 5, image);
|
||||
xlsx.saveAs("Book1.xlsx");
|
||||
|
||||
xlsx.save();
|
||||
QXlsx::Document xlsx2("Book1.xlsx");
|
||||
xlsx2.saveAs("Book2.xlsx");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user