PDA

View Full Version : Popup window with round borders



anderssonj
16th September 2007, 19:33
Hi,

I've created a top-level window (a QFrame with the Popup window flag set), and a stylesheet that gives me round edges using the radius property.

However, I get background color - not transparency - outside the round edges, between the drawn border and an imagined width() * height() rectangle.

When I use my widget as a child of another widget I do get the desired effect. It just doesn't work when the widget is a top-level window. I get the same behaviour on Mac and Win.

Do I need to create and set a mask for this to work?

Thanks in advance.

marcel
16th September 2007, 19:45
A mask will work, but you will get rough edges.
Search the forums for ARGB windows.
One of the users, kernel_panic, managed to do this by setting a transparent png as window background. By transparent I mean a rounded rectangle with soft edges.
However, it is only for windows and linux, as far as I know.



I get the same behaviour on Mac and Win.

Strange, it should work on mac.

Regards