Re: [PyQt] QSplashScreen with transparent background

2009-03-24 Thread Saúl Ibarra
On Tue, Mar 24, 2009 at 8:52 AM, David Douard david.dou...@logilab.fr wrote:
 pic = QtGui.QPixmap(:splash/images/splash.png)
 splash = QSplashScreen(pic, Qt.WindowStaysOnTopHint)
 splash.setMask(pic.mask())
 splash.show()

Yeah! That worked for me!! Thank you both!!

:)


-- 
Saúl -- Nunca subestimes el ancho de banda de un camión lleno de disketes.

http://www.saghul.net/

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] QSplashScreen with transparent background

2009-03-23 Thread Saúl Ibarra
Hi all,

I'm sure this question has been answered many times, but I'm not able
to achieve what I want :-/ I just want a splashscreen with a single
png with transparent background.

I'm using the following code:

pic = QtGui.QPixmap(:splash/images/splash.png)
splash = QtGui.QSplashScreen(pic)
splash.show()

I know the issue has to do with the alpha channel, but can't get it working...


Thanks in advance!


-- 
Saúl -- Nunca subestimes el ancho de banda de un camión lleno de disketes.

http://www.saghul.net/

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] QSplashScreen with transparent background

2009-03-23 Thread David Boddie
On Tue Mar 24 00:18:54 GMT 2009, Saúl Ibarra wrote:
 
 I'm sure this question has been answered many times, but I'm not able
 to achieve what I want :-/ I just want a splashscreen with a single
 png with transparent background.

Is this on Linux/Unix?

 I'm using the following code:

 pic = QtGui.QPixmap(:splash/images/splash.png)
 splash = QtGui.QSplashScreen(pic)
 splash.show()

 I know the issue has to do with the alpha channel, but can't get it
 working...

On some platforms, there are issues with the display system. This is covered
in the Translucent Widgets in Qt article in the latest Qt Quarterly:

  http://doc.trolltech.com/qq/

Basically, you need to be running a compositing window manager. More details
can be found here:

  http://doc.trolltech.com/4.5/qwidget.html#windowOpacity-prop

If you can't guarantee that users will have systems with this feature
enabled, you can always fall back to an approach where you fake a transparent
background. This is done by grabbing the screen with QDesktopWidget the way
the Screenshot example does, then drawing on it and cutting out the part you
want to display.

I believe this is way the Qt Jambi demo launcher does it, though it also does
some fancy things like blurring the background image.

David

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt