Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, June 2005
designer resizing widgets


Message 1 in thread

Hi I am using qt designer, I am trying to get an example going where I create a dialog, and add a line edit and a button in designer, and have them be resized according to the dialogs size.

Nothing I try seems to work. I have read the docs and examples from a number of sources. Seemingly designer is supposed to handle this aspect of the ui, but it's not.

I have:

set their size policy to expanding, 
set the horizontal/vertical stretch > 0
set the size increment on the form > 0
set the forms size policy to expanding
put the widgets in a horizontal layout

nothing is affecting the widgets behavior. the code that these settings affects is generated by qmake, so I can't really tinker with it. What am I not doing here??




Message 2 in thread

On June 3, 2005 09:39 am, Burlen wrote:
> Hi I am using qt designer, I am trying to get an example going where I
> create a dialog, and add a line edit and a button in designer, and have
> them be resized according to the dialogs size.
>
> Nothing I try seems to work. I have read the docs and examples from a
> number of sources. Seemingly designer is supposed to handle this aspect of
> the ui, but it's not.
>
> I have:
>
> set their size policy to expanding,
> set the horizontal/vertical stretch > 0
> set the size increment on the form > 0
> set the forms size policy to expanding
> put the widgets in a horizontal layout
>
> nothing is affecting the widgets behavior. the code that these settings
> affects is generated by qmake, so I can't really tinker with it. What am I
> not doing here??

Are you remembering to use layouts?  You'd normally handle this situation by 
placing the widgets in a layout and using spacers where appropriate.

-- 
 [ signature omitted ] 

Message 3 in thread

Use layouts but don't forget that for the top-level layout
you should select NOTHING and then activate horizontal,
vertical or grid layout. 

-- Gert. 


> -----Original Message-----
> From: Burlen [mailto:burlen@xxxxxxxxxxxxxxxxx] 
> Sent: 03 June 2005 16:40
> To: qt-interest@xxxxxxxxxxxxx
> Subject: designer resizing widgets
> 
> Hi I am using qt designer, I am trying to get an example 
> going where I create a dialog, and add a line edit and a 
> button in designer, and have them be resized according to the 
> dialogs size.
> 
> Nothing I try seems to work. I have read the docs and 
> examples from a number of sources. Seemingly designer is 
> supposed to handle this aspect of the ui, but it's not.
> 
> I have:
> 
> set their size policy to expanding,
> set the horizontal/vertical stretch > 0
> set the size increment on the form > 0
> set the forms size policy to expanding
> put the widgets in a horizontal layout
> 
> nothing is affecting the widgets behavior. the code that 
> these settings affects is generated by qmake, so I can't 
> really tinker with it. What am I not doing here??
> 
> 
> 
> 




********************** Legal Disclaimer ****************************
"This email may contain confidential and privileged material for the sole use of the intended recipient.  Any unauthorized review, use or distribution by others is strictly prohibited.  If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
**********************************************************************


Message 4 in thread

Gert, thank you it works!

On Friday 03 June 2005 11:57 am, Gerrit Van Loo wrote:
> 
> Use layouts but don't forget that for the top-level layout
> you should select NOTHING and then activate horizontal,
> vertical or grid layout. 
> 
> -- Gert. 
> 
> 
> > -----Original Message-----
> > From: Burlen [mailto:burlen@xxxxxxxxxxxxxxxxx] 
> > Sent: 03 June 2005 16:40
> > To: qt-interest@xxxxxxxxxxxxx
> > Subject: designer resizing widgets
> > 
> > Hi I am using qt designer, I am trying to get an example 
> > going where I create a dialog, and add a line edit and a 
> > button in designer, and have them be resized according to the 
> > dialogs size.
> > 
> > Nothing I try seems to work. I have read the docs and 
> > examples from a number of sources. Seemingly designer is 
> > supposed to handle this aspect of the ui, but it's not.
> > 
> > I have:
> > 
> > set their size policy to expanding,
> > set the horizontal/vertical stretch > 0
> > set the size increment on the form > 0
> > set the forms size policy to expanding
> > put the widgets in a horizontal layout
> > 
> > nothing is affecting the widgets behavior. the code that 
> > these settings affects is generated by qmake, so I can't 
> > really tinker with it. What am I not doing here??
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> ********************** Legal Disclaimer ****************************
> "This email may contain confidential and privileged material for the sole use of the intended recipient.  Any unauthorized review, use or distribution by others is strictly prohibited.  If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************
> 
>