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

Qt-interest Archive, January 2008
Ctrl-1 in Qt Designer will change the size of LineEdit


Message 1 in thread

At least in QT Designer 4.3.2 - Open Source Edition the use of 'Lay Out'
like 'Lay Out Horizontally' will change the size of LineEdit.

In other words, if I have LineEdit Widget in different sizes and I use
Ctrl-1 for example, after that all fields have the same size.

The same effect if I will use Ctrl-J on LineEdit Widget.

Can anybody confirm that and is that normal?

Regards

Guenther

--
 [ signature omitted ] 

Message 2 in thread

Guenther Boelter wrote:
> At least in QT Designer 4.3.2 - Open Source Edition the use of 'Lay Out'
> like 'Lay Out Horizontally' will change the size of LineEdit.
> 
> In other words, if I have LineEdit Widget in different sizes and I use
> Ctrl-1 for example, after that all fields have the same size.
> 
> The same effect if I will use Ctrl-J on LineEdit Widget.
> 
> Can anybody confirm that and is that normal?

Yes, that's what layouts do : they manage the widgets' geometry for you, 
taking into account each widget's size policy, size hints and stretch 
factor. If you have left those parameters to their default values, your 
line edits all have identical size policies and stretch factors and, as 
a result, are resized to identical sizes.

If you want your line edits to have different sizes, you should either 
give them fixed size policies, or set different stretch factors.

See http://doc.trolltech.com/4.3/layout.html for further details.

-- 
 [ signature omitted ]