PDA

View Full Version : rounded edges in qmainwindow



m.wojcik
11th March 2009, 08:30
Hello everybody,

I would like to create qmainwindow with my png backgriund with rounded corners. Unfortunately, when i've loaded my image as background (i'm using qss) i see that corners are rounded but it is field that is not covered by background is not transparent. Can you tell me how can i achieve this? How to create qmainwindow with rounded corners??

Thank you,

spirit
11th March 2009, 08:42
did you see this (http://www.qtcentre.org/forum/f-qt-programming-2/t-widget-with-rounded-edges-18885.html/?highlight=rounded) thread. it's very similar to your issue.

m.wojcik
11th March 2009, 09:07
hmm yeah that it, but i see that setMask is lowering performance? is there some directives to optimize it?

By "lowering performance" i mean that when i move window it is painting v. slow

wysota
11th March 2009, 11:37
What platform are you on? Maybe you can use ARGB windows?

m.wojcik
11th March 2009, 11:44
Yes, I'm using only windows - can you give me some links or detailed explanations bout that?

wysota
11th March 2009, 14:12
If you are using Windows then you can't use ARGB windows :) But if you are running Qt 4.5, then you can use Qt::WA_TranslucentBackground attribute.