[PyQt] Splash Screen
David Douard
david.douard at logilab.fr
Mon Oct 6 09:57:04 BST 2008
Le Friday 03 October 2008 12:04:49 projetmbc at club-internet.fr, vous avez
écrit :
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <title>Flashmail</title>
> <style type="text/css">
> BODY, TABLE, TR, TD, P {margin:0;padding:0;}
> BODY {background:#FFFFFF;}
> </style>
> </head>
> <body>
> <P>Hello,</P>
> <P>I would to know how to do a Splash Screen with PyQT.</P></body></html>
First, please use plain text format when sending messages to this
mailing-list.
Now, for your problem, here is an example:
# make proper imports
app = QApplication([])
pixmap = QPixmap(":/images/splashscreen.png")
splash = QSplashScreen(pixmap, Qt.WindowStaysOnTopHint)
splash.setMask(pixmap.mask()) # this is usefull if the splashscreen is
not a regular ractangle...
splash.show()
splash.showMessage(_(u'Starting...'), Qt.AlignRight | Qt.AlignBottom,
Qt.yellow)
# make sure Qt really display the splash screen
app.processEvents()
# start tha main app window
mainwindow = ...
# ...
# now kill the splashscreen
splash.finish(mainwindow)
--
David Douard LOGILAB, Paris (France), +33 1 45 32 03 12
Formations Python, Zope, Debian : http://www.logilab.fr/formations
Développement logiciel sur mesure : http://www.logilab.fr/services
Informatique scientifique : http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081006/14bdbfa1/attachment-0001.bin
More information about the PyQt
mailing list