Hello,
We have an UI application running in an embedded system which receives touch screen events. I would like to automate touch events in my application using another simple qt application which receives X and Y co-ordinates from the user.

Kindly help with some reference documents.

We tried the below code, no failures observed but it doesnt simulate the touch event.

Qt Code:
  1. QApplication a(argc, argv,QApplication::GuiServer);
  2.  
  3. QWSTslibMouseHandler *ptr;
  4. ptr = (QWSTslibMouseHandler*)QWSServer::mouseHandler() ;
  5. int x,y;
  6. printf("\n Enter X co-ordinate :");
  7. scanf("%d",&x);
  8. printf("\n Enter Y co-ordinate :");
  9. scanf("%d",&y);
  10. QPoint q;
  11. q.setX(x);
  12. q.setY(y);
  13. QPoint mousePos=q;
  14. printf("\nBefore Emit..");
  15. fflush(stdout);
  16. emit ptr->mouseChanged(mousePos,Qt::LeftButton);
  17. printf("\nAfter Emit..");
  18. fflush(stdout);
To copy to clipboard, switch view to plain text mode 
Thanks in advance!!