Results 1 to 19 of 19

Thread: QDialog resize

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog resize

    Yes, you need to apply a layout on the dialog object itself.

  2. #2
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: QDialog resize

    sorry , which layout can i use , please explain me?
    Thanks,
    Rajesh.S

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog resize

    Whichever one you want. All subclasses of QLayout are for you to use.

  4. #4
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: QDialog resize

    i am using designer to desing dialog , i have applied horizontal layout , still only my dialog is expanding not all other objects, is there any other properties we need to set for QDialog ?
    Thanks,
    Rajesh.S

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog resize

    Did you apply a layout to the form itself? You do this by clicking on the form outside any child widgets and then clicking on one of the layout icons. All widgets should then snap in place and resizing the form should cause all child widgets to be resized as well.

  6. #6
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: QDialog resize

    If I apply Layout my controls positions and dialog size is increased , how to apply Layout without losing dialog size and controls positions.
    Thanks,
    Rajesh.S

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog resize

    Layouts can be nested. You can also add spacers and set size policies of widgets. All that together should allow you to obtain positioning you need.

  8. #8
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: QDialog resize

    can u explain wich layout can we use with spacers?
    Thanks,
    Rajesh.S

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog resize

    Any layout can be used with spacers. Insert a spacer on the form in the desired position and wrap it into a layout together with the widgets.

  10. #10
    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: QDialog resize

    I'd recommend reading: Layout Classes
    J-P Nurmi

  11. #11
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: QDialog resize

    i used Layouts , itried vertical , horizantal and grid layouts,

    in vertivcal layout In runtime if i resize my dialog horizontally its not expanding controls width,

    in horizontall layout if i resize my dialiog vertically its not expoanding contols height

    If i resize my form my controls height and width should be resized accordingly , how to achieve this ?
    Thanks,
    Rajesh.S

  12. #12
    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: QDialog resize

    Would you mind reading the document I gave link to? Pay attention to section where it says something about size policies and stretch factors.
    J-P Nurmi

Similar Threads

  1. QDialog resize ?
    By allensr in forum Qt Programming
    Replies: 5
    Last Post: 11th December 2007, 19:47
  2. QDialog resize ?
    By allensr in forum Qt Programming
    Replies: 6
    Last Post: 28th October 2007, 22:41
  3. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 08:16
  4. Custom Shape Widget (resize)
    By PiXeL16 in forum Qt Programming
    Replies: 7
    Last Post: 12th February 2007, 07:00
  5. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32

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.