USB barcode reader in Qt4

北战南征 提交于 2019-12-01 07:39:37

Most barcode scanners, IIRC basically work like a keyboard from the point of view of your application. You just provide a text field and the barcode reader "types" what it reads. So you don't really need to worry about that, other than validating the input and maybe providing a hidden text field if you don't want the input shown.

Or a modal dialog saying "scan item" with focus on a hidden text area.

In terms of a barcode printer, if you know the standard to which you are outputting, you would do well creating an SVG or PDF and exporting to print. This way your app can handle print dimensions and so on.

You don't say what language you are using, so I can't find you a barcode writing library.

It's not really a Qt question.

Most scanners behave like aUSB keypad and just enter numbers as if you had typed them, otheriwse they will come with a library that you would use like any other.

This looks like an answer that is dependant on the functionality of the USB barcode scanner.

In my experience, which involved a USB barcode scanner, it simply scanned the barcode and sent it to the application as if the keystrokes for each digit in the barcode was simulated. I didn't need to have an API library, I just place an input on the textbox awaiting for the next scan.

You should check and see if that is the case. Or there could be a specialized API library to interact with the scanner.

I did use the OPOS toolkit which had a series of shims or thin wrappers for the .NET code, it was until I discovered that Microsoft had an integrated POS sdk libraries for the .NET framework here and here.

Hope this helps, Best regards, Tom.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!