Re: KNumInput::setLabel and ugly dialogs
- Date: Tue, 29 Apr 2008 19:06:44 +0200
- From: "Andreas Hartmetz" <ahartmetz@xxxxxxxxx>
- Subject: Re: KNumInput::setLabel and ugly dialogs
2008/4/27 Holger Freyther <zecke@xxxxxxxxxxx>:
As we don't have a general purpose "align my labels/widgets" class the best thing that we have is QFormLayout. That means that setLabel() will almost always break the alignment.
AFAIK Thomas Zander (KOffice) actually did write a class that aligns widgets in
a given layout but AFAIK it is too limited for general use.
Thomas, any news?
Hey,
I toyed a bit with KDE4.0 and was a bit upset by setting dialogs like the one
attached to the screenshot. I looked a bit at the code and I lack ideas how
to fix the root cause.
What these dialogs have in common are:
- One got some kind of a BoxLayout
- One adds a couple of KNumInput derived classes into the layout
- One uses KNumInput::setLabel
As I said above I lack ideas how to fix the KNumInputs so that they align
properly. For kcm_keys I ditched the KNumInput::setLabel, created a label
myself, used QLabel::setBuddy and put everything into a QFormLayout.
Specially the last bit is the important one. By using a QFormLayout we make
sure the label and input area are properly aligned.
Is there anything we can do to KNumInput to fix it? Using a layout, using a
QSpacerIterm? Provide a QLabel* KNumInput::label() and then put that into a
QFormLayout ourselves?
As we don't have a general purpose "align my labels/widgets" class the best thing that we have is QFormLayout. That means that setLabel() will almost always break the alignment.
AFAIK Thomas Zander (KOffice) actually did write a class that aligns widgets in
a given layout but AFAIK it is too limited for general use.
Thomas, any news?
comments
z.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
- References:
- KNumInput::setLabel and ugly dialogs
- From: Holger Freyther
- KNumInput::setLabel and ugly dialogs
- Prev by Date: [JOB]: KDE Related Employment Opportunities
- Next by Date: Re: KNumInput::setLabel and ugly dialogs
- Previous by thread: KNumInput::setLabel and ugly dialogs
- Next by thread: Re: KNumInput::setLabel and ugly dialogs
- Index(es):