Results 1 to 6 of 6

Thread: Resize all components in a dialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resize all components in a dialog

    Now I just attach a testing ui file, I expect my given components will be same ratio size when I will resize the dialog
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Resize all components in a dialog

    You'll need to apply a layout. Unselect child widgets, and select "Layout in a Grid" (in toolbar, Form-menu or context-menu).
    J-P Nurmi

  3. #3
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resize all components in a dialog

    If I make Grid layout then all of the child , then all of the component become same size, in my previous post I attach a ui file, in that file you can see, first row's ListBoxs are different shape, my intensition is that if I resize then child components also resize in same ratio. like 20%, 40%, 30% of the dialog width.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Resize all components in a dialog

    Adjust each widgets' sizePolicy-property. Notice horizontal and vertical stretch factors.
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    bdQtdev (10th January 2008)

Similar Threads

  1. Resizing the dialog boxes
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2007, 10:41
  2. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  3. Replies: 1
    Last Post: 1st February 2007, 17:07
  4. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.