PDA

View Full Version : Is there any way to fix base size of widgets



tonnot
23rd August 2011, 20:42
Is there any way to define, in example, a height for Label to let every Label I drop onto my form has this height ?
(I'd like to define this for some basic widgets).
Any idea ?

ChrisW67
24th August 2011, 00:04
I assume you are talking about Designer.

The size of widget will ultimately be set by the layout, its content and size hints, and the min/max width/height of the widget, so it is largely irrelevant what size they are when you first drop them onto their parent widget. You cannot affect the default value for these properties but you can bulk change them:

Drop all the QLabels on their parent widget
Select all the labels
Alter the minimum or maximum size properties

tonnot
24th August 2011, 09:31
mmm
Now I have 20 px. for the height of lineEdits and 22 for comboBox. As you can see a LineEdit placed next to a comboBox cannot be right aligned.
So I'd like to have 22 px for every lineEdit I use.

( And depending on my scenario maybe I'd choose another heoights)

I imagine there is a place where it is defined this, where ? Is does not exist something like 'profil' ????
Thanks.

wysota
24th August 2011, 09:44
As you were told the initial size of the label is irrelevant so nobody bothers to define profiles for sizes when dropping widgets in Designer. If you really want it, drop a label on your form, give it the size you want and then drag the label back to your widget toolbox. A new entry should appear in the bottom that contains your widget as a stencil. With a bit of luck it will retain the size you set, so dragging it back to the form will let you clone the stencil into widget instances. This stencil is persistant over Designer runs so you only need to do it once.

tonnot
24th August 2011, 11:05
OH! What a superb trick !!!
Thanks !!!

By last. Is there any way to unable de QT3support widgets ? I dont use them and I would like not to see them (they ocupy unusefull space). Any another trick ?

Rachol
24th August 2011, 11:21
Just delete the files for plugins you don't need from QTDir/plugins/designer