Results 1 to 5 of 5

Thread: circle widgets layout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2016
    Posts
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default circle widgets layout

    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.
    Attached Images Attached Images

Similar Threads

  1. Replies: 0
    Last Post: 30th April 2012, 15:17
  2. Replies: 5
    Last Post: 18th April 2010, 23:31
  3. Widgets Layout in a QToolBar.
    By cydside in forum Qt Programming
    Replies: 1
    Last Post: 27th June 2009, 08:46
  4. Putting Widgets into a Layout
    By jcoop in forum Newbie
    Replies: 16
    Last Post: 18th April 2009, 22:00
  5. Custom widgets in layout
    By Palmik in forum Newbie
    Replies: 11
    Last Post: 26th January 2009, 12:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.