请问QT中如何实现文件复制呢???

请问QT中如何实现文件复制呢???,第1张

用QFile::copy

附Qt Assistant说明

bool QFile::copy ( const QString &fileName, const QString &newName ) [static]

This is an overloaded member function, provided for convenience.

Copies the file fileName to newName. Returns true if successfulotherwise returns false.

If a file with the name newName already exists, copy() returns false (i.e., QFile will not overwrite it).

See also rename().

#include <QFile>

QFile::copy(const QString &fileName, const QString &newName)

//using static funtion


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/8142164.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-13
下一篇 2023-04-13

发表评论

登录后才能评论

评论列表(0条)

保存