gpt4 book ai didi

linux - 在Qt中获取USB磁盘列表

转载 作者:太空宇宙 更新时间:2023-11-04 04:33:55 24 4
gpt4 key购买 nike

我正在使用Qt进行开发,正在编写Linux平台的程序。我需要找到 USB 磁盘路径(例如/dev/sdb)。我怎样才能做到这一点?

最佳答案

查看http://api.kde.org/frameworks-api/frameworks5-apidocs/solid/html/index.html它与 Qt 很好地集成。您还可以使用 UDisks2 发布的 DBus API:https://udisks.freedesktop.org/docs/latest/

关于linux - 在Qt中获取USB磁盘列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36002697/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com