You need to use timers. Your slot for the timer callback will be the equivalent of the glutIdelFunc. If you set the timer interval to be 1, it will be continuously called. if you set it to 0, it will be called when all the events in the window system's event queue have been processed.