Quote Originally Posted by nrabara View Post
[...]

If i execute above code it doesn't show widget on the display, I understand that a.exec() should execute to enter in to the event loop.
That is because you never reach the call to a.exec(). This code continuously executes the loop, and as it can never leave the loop because the loop's condition is always true, the code beyond is never executed.

Quote Originally Posted by nrabara View Post
[...]

in while loop only execute once, and then a.exec() wait for the event.
How can I run while loop continuously to poll some function.
Is it mean that I need to start QTimer and need timer event every time?
Here a.exec() starts a new loop, that is why your original loop is only executed once.

If you want to display some data polled from a device you should probably use a seperate thread that does the polling and notifies the GUI via a signal if something changed. Have a look at the thread examples to see how this is done.