Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I want qt to recognize the usb and get the path to that usb as well.
Qt 6.11 is out! See what's new in the release blog

I want qt to recognize the usb and get the path to that usb as well.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 487 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    I want qt to recognize the usb and get the path to that usb as well.

    There are a lot of people who tell me to use libusb, but can I just include the dll in the project? Or do I have to set it up another way?

    I am developing on Windows and will eventually use it on Raspberry Pi.

    Here's an example I found.
    This is a way to recognize usb with nativeEvent event, and get VID, PID and Serial Number. But is there any way to know which USB is which path?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      On Windows you can use the Setup API (WIN32 API). Where you need to register the required USB device class UUID and then watch for the events. Also you can get a full path to the USB devices.

      On Linux you can use the UDEV (udev manager) with a similar way.

      PS: Google in help.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved