PDA

View Full Version : custom widget with separated circles/rings inside each other



marcell
17th March 2008, 18:03
as said in subject i would like to make custom widget with separated circles/rings inside each other so i can control every ring separately... it's probably good to show it by picture:
http://boo.mi2.hr/~marcell/circles.png

i was thinking of using QPainter.drawPie for every single circle but don't know how to overlay them.. any ideas on the best approach to this problem?

wysota
17th March 2008, 18:38
Can't you use the "Painter's Algorithm"? Or maybe I don't know what the problem is :)

marcell
17th March 2008, 18:44
please, any url on this in documentation? i can find on net just some references from 1998.

hm... seems that you propose just to draw most distant widgets first and the closest last... i'll try that... should do that before asking :o)

wysota
17th March 2008, 19:54
hm... seems that you propose just to draw most distant widgets first and the closest last...

Yes, that's the Painter's Algorithm :)

Oh, and you can check for hits in a reverse order.