Here another example of splash with progress bar of how i did for my application:<br><br><a href="http://opencoffee.lnxteam.org/trac/opencoffee/browser/trunk/opencoffee-server/core/splashScreen/splash.py">http://opencoffee.lnxteam.org/trac/opencoffee/browser/trunk/opencoffee-server/core/splashScreen/splash.py</a><br>
<br><div class="gmail_quote">2009/2/20 David Boddie <span dir="ltr"><<a href="mailto:david@boddie.org.uk">david@boddie.org.uk</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri Feb 20 16:39:11 GMT 2009, Chris Withers wrote:<br>
> Toby Dickenson wrote:<br>
<br>
> > * Startup time while your modules are imported. Plan to have a splash<br>
> > screen with a progress bar :-(<br>
><br>
> How do you do this with PyQt?<br>
<br>
One way is to take advantage of the fact that the splash screen is just<br>
a widget. You can just create a progress bar as a child widget and update<br>
that.<br>
<br>
For example:<br>
<br>
app = QApplication(sys.argv)<br>
<br>
# Create a pixmap - not needed if you have your own.<br>
pixmap = create_pixmap(480, 320)<br>
<br>
splash = QSplashScreen(pixmap)<br>
progressBar = QProgressBar(splash)<br>
progressBar.setGeometry(splash.width()/10, 8*splash.height()/10,<br>
8*splash.width()/10, splash.height()/10)<br>
splash.show()<br>
<br>
for i in range(0, 100):<br>
progressBar.setValue(i)<br>
<br>
# Do something which takes some time.<br>
t = time.time()<br>
while time.time() < t + 0.1:<br>
app.processEvents()<br>
<br>
<br>
I hope this is enough to help you get started.<br>
<br>
David<br>
_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Gustavo A. Díaz<br>GDNet Projects<br><a href="http://www.gdnet.com.ar">www.gdnet.com.ar</a><br>