我试图在文件资源管理器中打开 ftp url。
url = QUrl("ftp://192.168.1.127:15010/intrusionfiles/detectionfiles/",QUrl.TolerantMode)
url.setScheme("ftp")
QDesktopServices.openUrl(url)
当我以这种方式尝试时,它会询问我希望它如何打开。如何让它直接在文件资源管理器中打开?
通过使用 qprocess 启动 explorer.exe 解决了我的问题。
p = QProcess()
p.startDetached("C:\\Windows\\explorer.exe", ["ftp://admin:[email protected]:15010/intrusionfiles/detectionfiles/21-09-21/"])
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句