Flushing PyQt's Event Queue

Chris Mellon arkanes at gmail.com
Wed Dec 10 17:22:29 CET 2008

On Wed, Dec 10, 2008 at 6:30 AM, ff <flarefight at googlemail.com> wrote:
> Hi, I am writing an app which models growth of a system over time
> visually which is activated by button clicks, and when the loop
> finishes running i dont want any events [mainly clicking on buttons]
> that happened during the loop to be put into action since then it may
> run multiple times without the user realising what they have done,
> is there way to flush the event queue when the loop has finished??

This is a UI problem, not a programming problem. Instead of trying to
find a code solution to the problem, consider changing your UI so that
the actions aren't possible. For example, disable the buttons (perhaps
showing by showing a progress dialog box with a cancel button) while
the sim is running.

More information about the Python-list mailing list