简体   繁体   English

如何在Linux / Qt下获取USB通知?

[英]How to get USB notifications under linux / Qt?

I am newbie to linux and qt . 我是linux和qt的新手。

I want to get notify when usb get inserted and removed . 我想在usb插入和删除时收到通知。

How to do it ? 怎么做 ?

This sounds like a job for DBus . 这听起来像是DBus的工作。 I also think this answer could be of use to you. 我也认为这个答案对你有用。

There was a similar question. 有一个类似的问题。 Take a look here . 看看这里 Maybe it can help. 也许它可以帮助。 Btw. 顺便说一句。 Since you are a newbie, I would suggest to avoid DBus if possible, as usually it is a pain in the ass. 由于您是新手,因此我建议尽可能避免使用DBus,因为通常情况下这很麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM