内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
我想把一个目录从一个驱动器复制到另一个驱动器。我所选的目录包含许多子目录和文件。
如何使用Qt实现相同的功能?
在下面使用func,您将生成文件夹/文件列表(递归)--目标文件。
static void recurseAddDir(QDir d, QStringList & list) { QStringList qsl = d.entryList(QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files); foreach (QString file, qsl) { QFileInfo finfo(QString("%1/%2").arg(d.path()).arg(file)); if (finfo.isSymLink()) return; if (finfo.isDir()) { QString dirname = finfo.fileName(); QDir sd(finfo.filePath()); recurseAddDir(sd, list); } else list << QDir::toNativeSeparators(finfo.filePath()); } }
然后你可以开始从目的地复制文件列单到新的源目录中,如下所示:
for (int i = 0; i < gtdStringList.count(); i++) { progressDialog.setValue(i); progressDialog.setLabelText(tr("%1 Coping file number %2 of %3 ") .arg((conf->isConsole) ? tr("Making copy of the Alta-GTD\n") : "") .arg(i + 1) .arg(gtdStringList.count())); qApp->processEvents(QEventLoop::ExcludeUserInputEvents); if (progressDialog.wasCanceled()) { // removing tmp files/folders rmDirectoryRecursive(tmpFolder); rmDirectoryRecursive(tmpFolderPlus); setEnableGUI(true); return; } // coping if (!QFile::copy(gtdStringList.at(i), tmpStringList.at(i))) { if (warningFlag) { QMessageBox box(this); QString name = tr("Question"); QString file1 = getShortName(gtdStringList.at(i), QString("\\...\\")); QString file2 = getShortName(tmpStringList.at(i), QString("\\...\\")); QString text = tr("Cannot copy <b>%1</b> <p>to <b>%2</b>" \ "<p>This file will be ignored, just press <b>Yes</b> button" \ "<p>Press <b>YesToAll</b> button to ignore other warnings automatically..." \ "<p>Or press <b>Abort</b> to cancel operation").arg(file1).arg(file2); box.setModal(true); box.setWindowTitle(name); box.setText(QString::fromLatin1("%1").arg(text)); box.setIcon(QMessageBox::Question); box.setStandardButtons(QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::Abort); switch (box.exec()) { case (QMessageBox::YesToAll): warningFlag = false; break; case (QMessageBox::Yes): break; case (QMessageBox::Abort): rmDirectoryRecursive(tmpFolder); rmDirectoryRecursive(tmpFolderPlus); setEnableGUI(true); return; } } } }
目前呼叫中心只有API文档,需要用户自己开发。如果用户需要saas系统的呼叫中心可以使用智能外呼机器人:https://cloud.tencent.com/product/ccsr
你有没有调整观众端表现,即通过对 LivePushConfig 中的homeOrientation设置项进行配置,它控制的是观众端看到的视频宽高比是16:9还是6:19,调整后的结果可以用播放器查看以确认是否符合预期。
控制台使用的是新的接口,批量创建子网,https://cloud.tencent.com/document/product/215/31960,可以指定路由表。terraform开发的时候是基于api2.0开发的,还没有这个接口,因此暂时无法使用