【发布时间】:2013-10-07 01:06:29
【问题描述】:
我对@987654323@ 信号有疑问,基本上我是从条形码读取的,但不幸的是,我的读取条形码是因为一系列输入女巫使textChanged() 多次发出。在 stackoverflow 上搜索给了我这两个问题:C# WinForm + Barcode Scanner input, TextChanged Error 和 Detecting when a barcode scanner ends input,第一个解决方案我无法传输代码以使其对我有用(我不使用 C# 编写代码),第二个听起来很简单但是我无法阅读我的应用程序的结尾行:
connect(ui->matEdit, SIGNAL(textChanged(QString)), this, SLOT(GetEmployee(QString)));
void EmployeeDayLogger::GetEmployee(QString id)
{
char c = id.toAscii();
if(c == '\n')
{
编译输出:
..\..\..\Qt\Qt4.8.3\include/QtCore/../../src/corelib/tools/qbytearray.h: In member function 'void EmployeeDayLogger::GetEmployee(QString)':
..\..\..\Qt\Qt4.8.3\include/QtCore/../../src/corelib/tools/qbytearray.h:383: error: 'QByteArray::operator QNoImplicitBoolCast() const' is private
..\employeedaylogger.cpp:152: error: within this context
【问题讨论】:
标签: qt4 barcode barcode-scanner