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

Kishore Jonnalagadda kitts.mailinglists at gmail.com
Sat Jun 25 05:29:44 CEST 2011


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?

Kishore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110625/8936f79f/attachment.html 


More information about the Qt-interest-old mailing list