Qt4中的USB条码读取器 [英] USB barcode reader in Qt4

查看:77
本文介绍了Qt4中的USB条码读取器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何将USB条形码扫描仪和条形码打印机集成到Qt应用程序中.

I was wondering how could I integrate a USB barcode scanner into a Qt application, as well as a barcode printer.

我在寻找教程,但没有发现任何有趣的东西.有什么想法吗?

I looked for tutorials but didn't find anything interesting out there. Any ideas?

谢谢.

推荐答案

大多数条形码扫描仪,从您的应用程序的角度来看,IIRC基本上像键盘一样工作.您只需提供一个文本字段,然后条形码阅读器键入"它所读取的内容.因此,除了验证输入,如果您不希望显示输入内容,还可以提供一个隐藏的文本字段,您实际上不必担心.

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.

就条形码打印机而言,如果您知道要输出的标准,则可以很好地创建SVG或PDF并导出以进行打印.这样,您的应用程序就可以处理打印尺寸等.

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.

这篇关于Qt4中的USB条码读取器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆