The naming history of 'QLayout::getContentsMargins()' member?
General and Desktop
3
Posts
2
Posters
1.5k
Views
1
Watching
-
wrote on 18 Jan 2012, 00:26 last edited by
In Qt API, the getter function does not seem to use 'get' for its prefix, generally. But when reading Qt code, I met '
getContentsMargins()'. Is there anybody know how come this member is named? ( though I believe trolls can answer this :-) ) -
wrote on 18 Jan 2012, 07:28 last edited by
Most probably because it doesn't return anything (as a getter is usually expected to do), but uses out-parameters instead.
@
void QWidget::getContentsMargins(int *left, int *top, int *right, int *bottom) const
@
In addition, there is a "conventional" contentsMargin() getter.
@
QMargins QWidget::contentsMargins() const
@ -
wrote on 18 Jan 2012, 08:11 last edited by
I see. Thanks!
1/3