[Qt-interest] enter key event to serial communication
Yuvraj
yuvraj.ragupathi at indieontech.com
Mon Feb 22 12:29:17 CET 2010
Thiago Macieira wrote:
> Em Segunda-feira 22 Fevereiro 2010, às 10:37:59, Yuvraj escreveu:
>
>>>>>> QString crlf;
>>>>>>
>>>>>> crlf = 0x0d; // enter key value
>>>>>> QString data1 = ui->send_text->text().append(crlf);
>>>>>> com.writeData(data1.toLatin1(),100);
>>>>>> ui->send_text->clear();
>>>>>>
>
>
>> yes, problem with setup only. i solved that issue. but still problem
>> with CRLF
>>
>
> What CRLF?
>
> You're sending only CR. The LF is missing in your code.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
I could not able to detect \r \n character in receiver side.
String crlf;
crlf = 0x0D;
crlf=crlf.append(0x0A);
QString data1 = ui->send_text->text();
data1.append(crlf);
QByteArray array;
array=data1.toLatin1();
com.writeData(array,20);
com.flush();
ui->send_text->clear();
I am at linux os...
Thanks
Yuvraj
More information about the Qt-interest-old
mailing list