but my requirement is to generate in infinite loop ad show in window.
If you do an infinite loop then the event loop will not run. That means that setting the random_label or anything like that will not show on the screen as the slots cannot be handled: your infinite loop will block the event loop. The effect is that you have a frozen application. So, trust @JonB.
As per your request: to wait for one second and block everything (you have been warned!): use QThread::sleep(1);