资源简介
QReport.cpp
代码片段和文件信息
#include “QReport.h“
#include
#include
#include
#include “Debug.h“
QReport::QReport()
{
}
void QReport::MakePDFReport(std::string filePath)
{
TRACE();
std::string fileName = filePath + “\\DPCR-Report.pdf“;
QString fileNameString = QString::fromStdString(fileName);
QFile pdfFile(fileNameString);
pdfFile.open(QIODevice::WriteOnly);
QPdfWriter *pdfWriter = new QPdfWriter(&pdfFile);
pdfWriter->setPageSize(QPagedPaintDevice::A4);
pdfWriter->setResolution(300);//像素3508*2479
pdfWriter->settitle(“DPCR Report“);
int pageMargin = 100;
pdfWriter->setPageMargins(QMarginsF(pageMargin pageMargin pageMargin pageMargin));
QDateTime currentTime = QDateTime::currentDateTime();
QStri
评论
共有 条评论