Fix Issue1: Add insert_image() function

This commit is contained in:
Debao Zhang
2013-09-04 11:35:02 +08:00
parent 7f7fa7e9fa
commit b9dc02b79e
15 changed files with 692 additions and 12 deletions
+6
View File
@@ -0,0 +1,6 @@
TARGET = image
#include(../../../src/xlsx/qtxlsx.pri)
QT += xlsx
SOURCES += main.cpp
+25
View File
@@ -0,0 +1,25 @@
#include <QtGui>
#include "xlsxworkbook.h"
#include "xlsxworksheet.h"
#ifdef Q_OS_MAC
# define DATA_PATH "../../../"
#else
# define DATA_PATH "./"
#endif
int main(int argc, char** argv)
{
QGuiApplication(argc, argv);
QXlsx::Workbook workbook;
QXlsx::Worksheet *sheet = workbook.addWorksheet();
QImage image(400, 300, QImage::Format_RGB32);
image.fill(Qt::green);
sheet->insertImage(5, 5, image);
workbook.save(DATA_PATH"Test.xlsx");
// workbook.save(DATA_PATH"Test2.zip");
return 0;
}
+2 -1
View File
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = hello style \
documentproperty
documentproperty \
image