qt4 - Reading from barcode as one input -


i have issue textchanged() signal, basicly reading barcode unfortunately mine reads barcode series of input witch makes textchanged() emitted many times. searching on stackoverflow give me 2 questions: c# winform + barcode scanner input, textchanged error , detecting when barcode scanner ends input, first solution couldn't transfer code make work me(i don't code in c#), , second sounds easy fail read ending line application:

connect(ui->matedit, signal(textchanged(qstring)), this, slot(getemployee(qstring)));

void employeedaylogger::getemployee(qstring id) {     char c = id.toascii();     if(c == '\n')     { 

compilation output:

..\..\..\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' private ..\employeedaylogger.cpp:152: error: within context 

as text field hold whole barcode, try:

if (id.endswith('\n')) 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -