[PyQt] Re: Re: Any Large PyQt Projects?

Toby Dickenson tdickenson at geminidataloggers.com
Tue Feb 24 15:02:28 GMT 2009


Chris Withers wrote:

> Toby Dickenson wrote:
>> * Plan to have a splash screen with a progress bar :-(
> 
> How do you do this with PyQt?

Obviously you need to show the splash screen widget before importing the
majority of your application code. The import statement is usually seen at
the top of a module but it works inside a function too, so we have one
function which imports a few module (or performs other initialisation
tasks), bumps the progress bar by 10%, and repeats.

The last few lines of that function imports the module containing the main
widget, closes the splash screen, then shows the main widget.

For extra points you could import modules after showing the main widget,
either in a thread or on demand when functionality is needed. But I like
the reassurance that any SyntaxErrors get flushed out before that main
widget is shown.





More information about the PyQt mailing list