QDesktopServices::openUrl 在资源管理器中选择指定文件
在大多数编码程序中,您可以右键单击该项目,然后单击“在资源管理器中显示”,它会在资源管理器中显示选定项目的文件。在 Qt 中使用 QDesktopServices 如何做到这一点? (或在 QT 中执行此操作的任何方式)
In most coding programs, you can right click on the item and click show in explorer and it shows the file in explorer with the item selected. How would you do that in Qt with QDesktopServices? (or any way to do it in QT)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用此方法在 Windows 或 MacOS 上选择文件,如果您想在 Linux 上选择文件,您可以在 QtCreator 源代码中找到方法。
you can use this method to select file on Windows or MacOS ,if you want select on linux you can find a way in QtCreator sources.
您是否尝试过使用
file:///
语法?以下内容取自我正在使用的代码库:Have you tried using the
file:///
syntax? The following is taken from a code base I'm working with: