Re: Newbie-Questions: Solving Basic Layout Issues
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 <<
Re: Newbie-Questions: Solving Basic Layout Issues
On Wednesday 13 July 2011 (12:47:23) 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 Thank you for this hint. Applying it as follows to a QLabel works fine: initRunOutputLabel = new QLabel(i18nc("", "Output:"), initRun); QSizePolicy *vexp = new QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); initRunOutputLabel->setSizePolicy(vexp->horizontalPolicy(), vexp- >verticalPolicy()); However, applying it to the KUrlRequester, does not work: selectDestinationDir = new KUrlRequester(destinationDirGroup); selectDestinationDir->setMode(KFile::Directory); QSizePolicy *hexp = new QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); hexp->setHorizontalStretch(1); hexp->setVerticalStretch(1); selectDestinationDir->setSizePolicy(hexp->horizontalPolicy(), hexp- >verticalPolicy()); selectDestinationDir->sizePolicy().setHorizontalStretch(hexp- >horizontalStretch()); It is still not as wide as I wish. The solution proposed by David works fine as well. Thank you for that. Cheers Torbjoern signature.asc Description: This is a digitally signed message part. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Re: Newbie-Questions: Solving Basic Layout Issues
On Thu, July 14, 2011 2:06 pm, Torbjoern Klatt wrote: > On Wednesday 13 July 2011 (12:47:23) 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 > > Thank you for this hint. > > Applying it as follows to a QLabel works fine: > > initRunOutputLabel = new QLabel(i18nc("", "Output:"), initRun); > QSizePolicy *vexp = new QSizePolicy(QSizePolicy::Preferred, > QSizePolicy::Fixed); > initRunOutputLabel->setSizePolicy(vexp->horizontalPolicy(), vexp- >>verticalPolicy()); > > However, applying it to the KUrlRequester, does not work: > > selectDestinationDir = new KUrlRequester(destinationDirGroup); > selectDestinationDir->setMode(KFile::Directory); > QSizePolicy *hexp = new QSizePolicy(QSizePolicy::Expanding, > QSizePolicy::Preferred); > hexp->setHorizontalStretch(1); > hexp->setVerticalStretch(1); > selectDestinationDir->setSizePolicy(hexp->horizontalPolicy(), hexp- >>verticalPolicy()); > selectDestinationDir->sizePolicy().setHorizontalStretch(hexp- >>horizontalStretch()); > > It is still not as wide as I wish. You could try using a QHBoxLayout covering the entire row in the QGridLayout, and add the KUrlRequester to that, setting the 'stretch' parameter to 1. Not sure if that will be any better than what you've already tried. -- David Jarvie. KDE developer. KAlarm author - http://www.astrojar.org.uk/kalarm >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Re: [Kmymoney-devel] Re: Build error on MacOSX
>> Is there a possibility to disable KAddressbook support in KMM4? > No there is not. :-( > AFAIK libkabc should be in kdepimlibs, it was not moved. Yes, I know that now. The kdepimlibs4 port had just disabled KABC due to option -DKDEPIM_ONLY_KLEO=ON >> I guess there is probably no option to turn it off, but a patch to exclude >> the relevant lines of code would help me a lot. > There is not such patch yet. Too bad. :-) Anyway, thanks for your feedback. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Re: [Kmymoney-devel] Re: Build error on MacOSX
On Thursday 14 July 2011 22:33:48 Marko Käning wrote: > >> Is there a possibility to disable KAddressbook support in KMM4? > > > > No there is not. > : > :-( > : > > AFAIK libkabc should be in kdepimlibs, it was not moved. > > Yes, I know that now. > The kdepimlibs4 port had just disabled KABC due to option > > -DKDEPIM_ONLY_KLEO=ON I'm lacking context here, but enabling this option sounds like a mistake to me. The only reason it exists is for building the installers for Gpg4Win (http://gpg4win.org/), other builds should not enable it. regards Volker signature.asc Description: This is a digitally signed message part. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<