2017-09-16 16:34:45 +09:00
|
|
|
// image.cpp
|
|
|
|
|
2019-01-02 20:56:00 +09:00
|
|
|
#include <QtGlobal>
|
|
|
|
#include <QtCore>
|
|
|
|
#include <QDebug>
|
2017-09-16 12:21:23 +09:00
|
|
|
#include <QtGui>
|
2019-01-02 20:56:00 +09:00
|
|
|
|
2017-09-16 12:21:23 +09:00
|
|
|
#include "xlsxdocument.h"
|
|
|
|
|
2017-09-16 16:34:45 +09:00
|
|
|
int image()
|
2017-09-16 12:21:23 +09:00
|
|
|
{
|
|
|
|
QXlsx::Document xlsx;
|
|
|
|
QImage image(40, 30, QImage::Format_RGB32);
|
|
|
|
image.fill(Qt::green);
|
|
|
|
for (int i=0; i<10; ++i)
|
|
|
|
xlsx.insertImage(10*i, 5, image);
|
2017-09-23 11:12:59 +09:00
|
|
|
xlsx.saveAs("image1.xlsx");
|
2017-09-16 12:21:23 +09:00
|
|
|
|
2017-09-23 11:12:59 +09:00
|
|
|
QXlsx::Document xlsx2("image1.xlsx");
|
|
|
|
xlsx2.saveAs("image2.xlsx");
|
2017-09-16 12:21:23 +09:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|