摘要:
QFile本身有copy函数,在这里使用QTextStream实现一下。QFile sourceFile("test.txt");QFile targetFile("readtext.txt");if(sourceFile.open(QIODevice::ReadOnly | QIODevice::Truncate)& targetFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) { QTextStream in(&sourceFile); QTextStream out(&am 阅读全文