Hi there,
My project uses QtDesigner to create a GUI for Kit Mini2440. It has a Line edit box to receive texts from user and send them via UART. All project was built without error and downloaded to the Mini2440 successfully.
But, when I press SEND button to send texts in this box "Line edit", I got the message "[name of project] was terminated due to application error (11)".
This is my code to change get text and send them:
I use library "terminos.h" for UART
Qt Code:
  1. QString text="";
  2. text=text_setspeed->text(); //text_setspeed is the name of the Line edit
  3. write(fd,text.latin1(),text.length());
  4. // But if I code like this, it has no error:
  5. QString text="abc";
  6. write(fd,text.latin1(),text.length());
To copy to clipboard, switch view to plain text mode 

I guess I has problem when change type of variable from Qstring >> char * by "text.latin1()". Because the function write() is defined as: write(fd, data, n_bytes);
with char *data and int n_bytes.
Ps: I attached my project.test5.zip
Thank you in advance.