From 618dcec52c0c5007ade6e62b39c642d42ecae588 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Fri, 17 Apr 2026 18:30:06 +0800 Subject: [PATCH] =?UTF-8?q?tiff=E5=9B=BE=E7=89=87=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=8B=B7=E8=B4=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 9089f3b..55dcee7 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -2543,6 +2543,14 @@ bool MainWindowCurve::saveMultipageTiff(const QList images, const QStrin return true; } +void copyFile(const QString &sourcePath, const QString &destinationPath) { + if (QFile::copy(sourcePath, destinationPath)) { + qDebug() << "文件拷贝成功!"; + } else { + qDebug() << "文件拷贝失败!"; + } +} + //isbmp=0 to printer or pdf // =1 to printer by use image // =2 to tif by created this soft @@ -2912,6 +2920,14 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, saveMultipageTiff(images, filename); // 合并、保存为TIFF文件 // writeTiff(images[0], filename);//测试单个文件 + if(pngName.contains(".tif")) + { + copyFile(filename, pngName); + //删除 tiff 中间文件 + QDir ss(filename); + ss.remove(filename); + } + else { QImage img1(filename); if(!img1.isNull())