View Full Version : setMask (smooth)
pakulo
14th May 2007, 16:40
How i can set the mask look like the right picture (frmae is smooth)?
http://file.oboz.ua/files/vf46476dce1c064_200751322586.jpg
My result in the left.
wysota
14th May 2007, 17:29
The mask is a bitmap (opaque/transparent) so if you need to include antialiasing, the mask should return opaque (1) for parts that are to be antialiased.
It depends on what you want to do. If you want to display a QPixmap in your application you should use a transparent png or use setAlphaCannel() instead of setMask() and the background will be propagated.
On the other hand if you want to set the shape of a window(like the shaped clock example) you're out of luck. There is no easy platform independent way to do this. See this (http://www.qtcentre.org/forum/f-qt-programming-2/t-display-only-png-image-on-desktop-7013.html) thread.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.