注意一定要用斜杠,用反斜杠和双反斜杠都打开失败

QPushButton* openPath = new QPushButton(ui->treeWidget_2);
  openPath->setToolTip(path);
  openPath->setText("打开路径");
  QObject::connect(openPath, &QPushButton::clicked, [=](){
    QDesktopServices::openUrl(QUrl("D:/Work/QtSpace/QualityCheck/cfg"));
});

 

相关文章:

  • 2022-12-23
  • 2021-06-01
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-02
  • 2021-11-18
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2021-06-15
相关资源
相似解决方案