On Thu, Feb 11, 2010 at 10:42 PM, Victor Noagbodji
<[email protected]> wrote:
>
> hello all,
>
> if you visit http://jsgrowl.com/, you will see nice modal and
> semi-modal windows. the idea is to reproduce them using pyqt. i
> started with a qlabel. used html for the content. set the window flag
> to Qt.SplashScreen. and applied my stylesheet.
>
> but the squared corner is not going way.
You can use QWidget.setMask
Here is a demo how to show a splash screen with a non-rectangular
splash screen (using a png with alpha background)
splash = QSplashScreen()
img = QImage("splash.png")
pm = QPixmap.fromImage(img)
if not pm.mask():
if img.hasAlphaBuffer(): bm = img.createAlphaMask()
else: bm = img.createHeuristicMask()
pm.setMask(bm)
if pm.mask(): splash.setMask(pm.mask())
splash.setPixmap(pm)
splash.show()
splash.finish(main_window)
Henning
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt