I have created a widget that looks like a circle (using QPainterPath) and I want to put several of them into another widget, in a circle, as shown in the attachment. Kind of a flower-looking thing. I'm looking for advise on the best way to do this. I'm using a QGridLayout where I set a stretch value of 1 for 15 columns and 15 rows. Then I add each circle widget at a certain row/column, and set the span for both column and row to 5. The numbers 5 and 15 were picked pretty randomly. When I resize it, most of the time it looks ok, but not always. I think the reliance on the numbers 5 and 15 are what makes it look ok at some sizes, not so good at others. Is there a better way to do this? I feel like I'm trying to force the layout to work, but it seems so close to what a grid layout should do. Would I be better off creating my own layout? Or should I not use a layout and do everything myself in the resizeEvent() method? Thanks.
Bookmarks