简体   繁体   English

如何在linux / Qt中检测USB连接

[英]How to detect a USB connection in linux/Qt

i am extremely new to both qt and linux , can u please tell me a way how to detect a usb device connection and disconnection using qt in linux platform . 我对qt和linux都很新,请你告诉我如何在linux平台上使用qt检测usb设备连接和断开连接。

any help , doccuments, urls/sites where i can get the basic information (in detail would be even better) is appriciated. 任何帮助,文件,网址/网站,我可以得到基本信息(详细将更好)是appriciated。

please help 请帮忙

thanks in advance, 提前致谢,

SAMBEET KUMAR SAMBEET KUMAR

如果您的平台上有可用的版本(大多数Linux平台都可以),您可以考虑使用DBus来获取类似的通知,并且Qt通过各种类内置了DBus支持。

since you are already working with Qt in a Linux environment, using KDE4 libraries should be easy to understand because they are built on top of Qt and follow similar design principles. 由于您已经在Linux环境中使用Qt,因此使用KDE4库应该很容易理解,因为它们构建在Qt之上并遵循类似的设计原则。 With KDE4, you have access to the Solid library for managing system hardware information. 使用KDE4,您可以访问Solid库来管理系统硬件信息。 This tutorial can help you to get introduced. 教程可以帮助您了解。

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

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