Results 1 to 9 of 9

Thread: Designer not adjusting size right

  1. #1
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Designer not adjusting size right

    Sometime since in the last few months, the way Designer adjust sizes has changed. In the past, when you right clicked on a form and selected "Lay out -> Adjust Size", it would adjust the size of the form based on the layouts, just as if adjustSize() were called in the application. But now I am seeing that it doesn't work with QGroupBox anymore! It's as if Designer does not recognize the contents of group boxes.

    Here is a screenshot from 4.1.4 with two group boxes. Notice how closely spaced the buttons are. I can resize the form so that the group box contents will actually disappear!

    Is this a known bug? Does anyone know any workarounds? Thanks...
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer not adjusting size right

    From you screenshots, it looks as if there are no layouts in the actual group boxes...

  3. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Designer not adjusting size right

    Quote Originally Posted by e8johan
    From you screenshots, it looks as if there are no layouts in the actual group boxes...
    If there are no layouts, then what is scrunching them up? I right click in the group boxes and selected layout in a grid. I am not using separate layouts though. Should I? Does Designer need redundant layouts to get this to work?

    Btw, everything works find when actually built and run as an applicaiton. Just not inside Designer.

  4. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Designer not adjusting size right

    Looking at the uic output of the form, setupUi() does indeed create a QGridLayout in the group box. Even though it isn't explicitly shown in Designer, it's still there. Which can be demonstrated simply by displaying a preview.

  5. #5
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer not adjusting size right

    is the right image after clicking "Adjust Size" or after resizing by hand?

    as a workaround you can try seting a minimum size..

    regards..
    aman..

  6. #6
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Designer not adjusting size right

    No, the problem is when I do "Adjust Size". I can also resize by hand until all content in the groupbox disappears. Adding a separate layout inside the groupbox does not fix things. It does the same thing if I try using a QFrame instead.

    I logged a bug with Trolltech today.

  7. #7
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer not adjusting size right

    Quote Originally Posted by aMan
    as a workaround you can try seting a minimum size..
    i don't think, it's a bug..
    it only doesn't do what you expected..

    regards..
    aman..

  8. #8
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Designer not adjusting size right

    It doesn't do what the preview and application do. And it doesn't do what 4.1.0 did. So I consider it a bug.

  9. #9
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Designer not adjusting size right

    I've only used Qt since 4.1.2, and I have not understood what "Adjust Size" in Designer is supposed to do, probably because it has been setting sizes randomly...?!!?!
    Software Engineer



Similar Threads

  1. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  2. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28
  3. Size of a plugin widget in designer
    By high_flyer in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2006, 13:29
  4. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14
  5. How to create custom slot in Qt Designer 4.1?
    By jamadagni in forum Qt Tools
    Replies: 31
    Last Post: 18th January 2006, 20:46

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.