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())