1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-30 05:02:52 +08:00

update chartsquestions example

This commit is contained in:
Jay Two 2019-02-26 18:19:39 +09:00
parent c9c8a54820
commit d273ce7159
2 changed files with 16 additions and 8 deletions

View File

@ -5,6 +5,7 @@
#include <QFile>
#include <QString>
#include <QMessageBox>
#include <QDebug>
#include "sat_calc.h"
@ -145,17 +146,23 @@ void sat_calc::generate_report()
chrom_data_array += ":B" + QString::number(output_line_count - 1);
Chart * Crom = output.insertChart( 3, 5, QSize(600, 500) );
Crom->setChartType( Chart::CT_Scatter );
Crom->setChartType( Chart::CT_ScatterChart );
Crom->addSeries( CellRange(chrom_data_array) );
Crom->setAxisTitle( Chart::Left, QString("left title") ); // dev24
Crom->setAxisTitle( Chart::Bottom, QString("bottom title") ); // dev24
Crom->setChartTitle( QString("hello chart") ); // dev25
Crom->setAxisTitle( Chart::Left, QString("left title") );
Crom->setAxisTitle( Chart::Bottom, QString("bottom title") );
Crom->setChartTitle( QString("hello chart") );
qDebug() << "[debug] chrom_data_array : " << chrom_data_array;
output.saveAs(report_file);
input.close();
Document doc2(report_file);
if (doc2.load())
{
doc2.saveAs("doc2.xlsx");
}
QMessageBox msgBox;
msgBox.setText("Success to write a xlsx file.");
msgBox.exec();

View File

@ -2,11 +2,12 @@
# sat_gui.pro
#
# Copyright (c) 2018 edosad(github) All rights reserved.
# Some code is fixed by j2doll.
#
# Some code is fixed by j2doll(github)
QT += core gui
# greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
QT += core
QT += gui
QT += widgets
TARGET = sat_gui
TEMPLATE = app