If the barcode reader injects scanned codes into the keyboard stream immediately after you plug it in (i.e. without installing drivers) then it is designed as a HID class device. Unless the manufacturer tells you otherwise and provides a driver that reconfigures the device it will never appear as a serial device (communications class).
The keyboard input should go to whatever widget has focus. I see no reason that needs to be in dialog. If your focus is on a QLineEdit with a suitable validator for the bar codes then you should have a reasonable way to ensure you get the code either by scanning or manual keying (for those occasions when you are in a hurry and a barcode simply will not scan).
Bookmarks