PDA

View Full Version : wait the application for some time..



mohanakrishnan
9th December 2009, 07:03
hi
I am writing an application which receives data from the serial port.device.
The application will receive request protocol frequently.
When the app receives a request protocol ,then it should immediately send the
acknowledgment protocol to the particular serial device,then this device will send a status
success protocol.After this status success protocol only,the app can send the acknowledgment to the next received protocol,and then receive the status success protocol and so on.,

My problem is ,how to make the app to wait for some time say about 1 r 2 sec.,
within the time it will process the request.
meanwhile there may be many requests coming to the application ,so all those requests
should be waited in queue and processed without problem.

thanks in advance..:):confused:

wagmare
9th December 2009, 07:16
QThread is the best option for u . wait in a while loop till the first process completes and proceed for next connection ..

take a look at Qt::ConnectionType and mandelbrot example

mohanakrishnan
9th December 2009, 08:17
hi wagmare
thanks for ur reply ,i ll try and come back...
thanks

wysota
9th December 2009, 08:22
My problem is ,how to make the app to wait for some time say about 1 r 2 sec.,
within the time it will process the request.
meanwhile there may be many requests coming to the application ,so all those requests
should be waited in queue and processed without problem.


Please don't start multiple threads on the same subject.

http://www.qtcentre.org/forum/f-qt-programming-2/t-regarding-multithreading-26385.html