Here another example of splash with progress bar of how i did for my
application:

http://opencoffee.lnxteam.org/trac/opencoffee/browser/trunk/opencoffee-server/core/splashScreen/splash.py

2009/2/20 David Boddie <[email protected]>

> On Fri Feb 20 16:39:11 GMT 2009, Chris Withers wrote:
> > Toby Dickenson wrote:
>
> > > * Startup time while your modules are imported. Plan to have a splash
> > > screen with a progress bar :-(
> >
> > How do you do this with PyQt?
>
> One way is to take advantage of the fact that the splash screen is just
> a widget. You can just create a progress bar as a child widget and update
> that.
>
> For example:
>
> app = QApplication(sys.argv)
>
> # Create a pixmap - not needed if you have your own.
> pixmap = create_pixmap(480, 320)
>
> splash = QSplashScreen(pixmap)
> progressBar = QProgressBar(splash)
> progressBar.setGeometry(splash.width()/10, 8*splash.height()/10,
>                        8*splash.width()/10, splash.height()/10)
> splash.show()
>
> for i in range(0, 100):
>    progressBar.setValue(i)
>
>    # Do something which takes some time.
>    t = time.time()
>    while time.time() < t + 0.1:
>        app.processEvents()
>
>
> I hope this is enough to help you get started.
>
> David
> _______________________________________________
> PyQt mailing list    [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to