[Qt-interest] About QWidget::contentsMargins()

Kishore kitts.mailinglists at gmail.com
Mon Jun 27 16:16:41 CEST 2011


On Saturday 25 Jun 2011 8:59:44 AM Kishore Jonnalagadda wrote:
> I have a couple questions about QWidgets and contents margins.
> 
> 1) widget->contentsMargins() != widget->layout()->contentsMargins() Should
> they not be the same? How are they different from each other?
> 
> 2) The documentation for QMargins::QMargins() indicates that this default
> constructor creates an object with values obtained from the style in use
> which is typically 11. However, under linux/KDE with the default oxygen
> theme, the defult size used in QMargins in indeed 11 but when i try to read
> qApp->style()->pixelMetric(QStyle::PM_Layout*Margin) it returns 4. Further,
> 4 is also the value shown by designer in its properties view and preview but
> then becomes 11 when used in the final application.
> 
> Are these bugs? or do i misunderstand the concepts?

*bump* Can anybody educate me on these topics?
Cheers!
Kishore



More information about the Qt-interest-old mailing list