On Wed, July 13, 2011 6:47 pm, Christopher Reichert wrote:
>> In the first tab I see two issues:
>> The first is, that the LineEdit for the directory is a little to short.
>> I
>> think, it would be nicer to be as long as the surrounding GroupBox.
>> The second is, that the space before and after the QLabel "Additional
>> options
>> passed to tar:" is huge. That should be a lot smaller and the big gab
>> should
>> be below the subsequent LineEdit at the bottom.
>> The same issue is on the second tab with the QLabel named "Output".
>>
>> My question now: What is the best way of solving these issues?
>>
>> I guess, I do not have to mention, that hard coding width and height of
>> the
>> objects is not an option.
>
> As far as I can tell you need to set the size policy for the widgets
> that you wish to be longer (or shorter).
> http://doc.qt.nokia.com/latest/qwidget.html#sizePolicy-prop

The suggestion of using size policy might well fix it, but size policy
doesn't always work as you'd expect. An alternative way would be to add a
blank expanded row to bottom of the grid layout:

packCfgOptionsGroupLayout->setRowStretch(5, 1);

It might possibly be necessary to put something in the row to make this
work (I can't remember) - in that case, do

packCfgOptionsGroupLayout->addWidget(new QWidget(packCfgOptionsGroup), 5,
0, 1, 1);

That has the disadvantage that if the group box shrinks, the row
containing the invisible widget will still occupy some space. You may be
able to add an extra layout to the QGridLayout instead of a widget, which
would avoid that issue.

-- 
David Jarvie.
KDE developer.
KAlarm author - http://www.astrojar.org.uk/kalarm

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to