Qt and barcode
-
Hello, i have somes questions:
-Are there library with Qt to connect to barcode reader and get current flashed code ?
-Is it allowed to sell an Qt application, and what is the limitation with free-license ? Just the support ? -
Hi
1:
Not directly in Qt but there is
https://github.com/ftylitak/qzxing
2:
Its not a free license as such. Its open-source license which has rules to follow.
Yes you can sell your app.
You get many extra things with a license. The whole
Device Creation part and much more. So its not just support.
They changed it now - so its also how fast you will get bugfixes etc. -
Okay, very interesting library ! Thanks ! Just one question, i the main page of this library, i look i can decode codebar from picture, but how can i obtain this picture, with this library? Or other ?
-
Okay, very interesting library ! Thanks ! Just one question, i the main page of this library, i look i can decode codebar from picture, but how can i obtain this picture, with this library? Or other ?
@Fulgurance
Hi
Often you would not get an image unless its on a smartphone and you use its camera to capture image.
You would directly get data from the scanner. The scanner know the formats and
decode them on scan.
How you talk to scanner, depends on how its connected. Often via serial and sometimes usb.So what scanner do you have ?
Sometimes scanners are setup as a virtual keyboard so when you scan the data is
sent as keys and you can scan to say aQLineLaebl to get its data.So how you read the data depends to huge degree on the setup/scanner.
-
Several months ago I worked on a Qt application that was required to receive input from a barcode scanner of the type(s) shown here: https://www.barcodesinc.com/symbol/symbol-barcode-scanners.htm
Having never even held a barcode scanner in my hand before, I assumed it was a more complicated peripheral than it actually is.
I had exactly the case that @mrjj described: a keyboard.
The scanners from Symbol (and probably many others) are literally detected as a USB Keyboard by your PC. When you press a button on the scanner and the red scan light finds a barcode, it simply types the barcode characters like a "phantom" person using an unseen keyboard.
In my application, the barcode scanner provided the ONLY input, so I listened for QKeyEvent(s) at a global level. In an application that also processes human interaction from other buttons and dropdowns, then I imagine that the "trick" is to make sure that a designated text input control has focus when the scan takes place, and then the "scanner-keyboard" will type the barcode into that GUI control.
If you end up with that kind of "scanner-keyboard", then no special third-party code would be needed to interact with the scanner.