Results 1 to 2 of 2

Thread: Resizing problems when applying a layout

  1. #1
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    11

    Default Resizing problems when applying a layout

    Hi,

    I have a Line Edit, a Horizontal Spacer, and a Push Button that I want to put into a layout. I have sized each widget to the geometry that I require, but when I put them into a layout, the layout changes the dimentions of the widgets! I've tried to Layout Horizontally, Layout in a Grid, and Layout Horizontally in a Splitter, and I can not get the sizes and placement that I want! Please tell me what I'm doing wrong.

    Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resizing problems when applying a layout

    First add the widgets, then the layout and finally tweak the sizePolicy, horizontalStretch, verticalStretch, minimumSize and maximumSize properties of those widgets.

Similar Threads

  1. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  2. Resizing a Layout
    By vvbkumar in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2006, 08:02
  3. "dynamic" layout
    By hulk in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2006, 07:16

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.