Results 1 to 9 of 9

Thread: USB HID connect on QT?

  1. #1
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default USB HID connect on QT?

    please help me. i fighting with read generic data USB HID in a QT project on Linux or window.this project will receives company' name and read files in USB and after they will be send to interface of QT. i still do not know.thanks for help me!!

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: USB HID connect on QT?

    Show code and explain exactly which part doesn't work and what it should do.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: USB HID connect on QT?

    Sorry but isn't HID used for devices such as mice and keyboards and not transferring files? Isn't mass storage what you want? If you're using a standard device then Windows will mount it by itself and you can access it as any other disk in your system.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: USB HID connect on QT?

    thanks for reply,..I have not done it .. it's just an idea,if you have an example as this, please give me..thank you very much!!

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: USB HID connect on QT?

    We have no idea what you are trying to do so it is not possible to give you any examples.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Apr 2013
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: USB HID connect on QT?

    Hi i am just starting on QT,

    My aim is to make a QT application that reads data through USB port (HID) sent from a Micro-Controller,

    Would you have any example to recommend ?

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: USB HID connect on QT?

    Qt has no facilities for direct USB access. If your microcontroller presents like:
    • a keyboard or mouse, then you will receive the data through either mouse or keyboard events after it has been processed by the operating system;
    • a game controller, UPS or other HID device, then you will likely not see events in Qt; or
    • a virtual serial port (i.e. not HID) then you can use one of several Qt-based serial port classes to access the port.


    If you need low-level direct USB access then you should look at using the third-party libusb or you could use your platform's USB API directly.

  8. #8

    Default Re: USB HID connect on QT?

    You can use HID API library: http://www.signal11.us/oss/hidapi/

  9. #9
    Join Date
    Apr 2013
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: USB HID connect on QT?

    Thanks so much Chris and Pavlya,

    I found a QT example integrating the libusb but
    i could not compile it well with my limited knowlege https://github.com/iia/Qt_libusb

    I am a bit lost on how to use libusb on QT, any ideas ?

Similar Threads

  1. Replies: 16
    Last Post: 16th February 2010, 13:17
  2. Replies: 4
    Last Post: 10th November 2006, 15:38
  3. connect
    By mickey in forum Newbie
    Replies: 15
    Last Post: 2nd August 2006, 22:42
  4. many connect
    By mickey in forum Qt Programming
    Replies: 3
    Last Post: 29th May 2006, 12:55
  5. connect
    By mickey in forum Qt Programming
    Replies: 12
    Last Post: 27th May 2006, 12:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.