QMargins Class Reference

[ QtCore module]

The QMargins class defines the four margins of a rectangle. 更多...

方法

Special Methods


详细描述

The QMargins class defines the four margins of a rectangle.

QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.

isNull () 函数返回 true only if all margins are set to zero.

QMargin objects can be streamed as well as compared.


方法文档编制

QMargins.__init__ ( self )

Constructs a margins object with all margins set to 0.

另请参阅 isNull ().

QMargins.__init__ ( self , int  aleft , int  atop , int  aright , int  abottom )

Constructs margins with the given left , top , right , bottom

另请参阅 setLeft (), setRight (), setTop (),和 setBottom ().

QMargins.__init__ ( self , QMargins )

int QMargins.bottom ( self )

Returns the bottom margin.

另请参阅 setBottom ().

bool QMargins.isNull ( self )

Returns true if all margins are is 0; otherwise returns false.

int QMargins.left ( self )

Returns the left margin.

另请参阅 setLeft ().

int QMargins.right ( self )

Returns the right margin.

另请参阅 setRight ().

QMargins.setBottom ( self , int  abottom )

Sets the bottom margin to bottom .

另请参阅 bottom ().

QMargins.setLeft ( self , int  aleft )

Sets the left margin to left .

另请参阅 left ().

QMargins.setRight ( self , int  aright )

Sets the right margin to right .

另请参阅 right ().

QMargins.setTop ( self , int  atop )

Sets the Top margin to Top .

另请参阅 top ().

int QMargins.top ( self )

Returns the top margin.

另请参阅 setTop ().

bool QMargins.__eq__ ( self , QMargins   m2 )

bool QMargins.__ne__ ( self , QMargins   m2 )