Results 1 to 2 of 2

Thread: Can't change items aligment in QGraphicsLinearLayout

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Location
    Wroclaw, Poland
    Posts
    72
    Thanks
    6
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs up Re: Can't change items aligment in QGraphicsLinearLayout

    After few investigations I find out that layout isn't taking his size from widget inside which his placed. Widget size is fixed to (60,120), while layout takes only (20,46) for him self. Two item placed inside are 20,20 in size, so layout takes only so much space to enclose this items.
    Why layout isn't expanding? I set size policy for layout to QSizePolicy::MinimumExpanding, but it didn't help at all.

    When items inside had set only minimum and preferred size (maximum wasn't set) - layout was taking as much space as possible. But items placement wasn't correct. Now when I set maximum size too - layout isn't expanding.

    EDIT:
    I couldn't find any good flexible solution. Even QT examples weren't helpful - in them item were placed by calculating position in paint() method. And this is what I did.
    But, in my opinion. layout should place items spread evenly on entire available space.
    Last edited by T4ng10r; 28th December 2009 at 12:35.

Similar Threads

  1. Replies: 5
    Last Post: 27th November 2009, 13:57
  2. Some menubar items can not be clicked
    By richardander in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2009, 00:26
  3. Use delegate to draw different type of items
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2009, 13:16
  4. Light items for the graphicsView
    By maverick_pol in forum Qt Programming
    Replies: 12
    Last Post: 1st November 2007, 18:51
  5. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.