QMargins 类

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

头: #include <QMargins>
Since: Qt 4.6

公共函数

QMargins ()
QMargins (int left , int top , int right , int bottom )
int bottom () const
bool isNull () const
int left () const
int right () const
void setBottom (int bottom )
void setLeft (int left )
void setRight (int right )
void setTop (int Top )
int top () const
bool operator!= (const QMargins & m1 , const QMargins & m2 )
bool operator== (const QMargins & m1 , const QMargins & m2 )

详细描述

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.

The isNull () function returns true only if all margins are set to zero.

QMargin objects can be streamed as well as compared.

成员函数文档编制

QMargins:: QMargins ()

Constructs a margins object with all margins set to 0.

另请参阅 isNull ().

QMargins:: QMargins ( int left , int top , int right , int bottom )

构造边距采用给定 left , top , right , bottom

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

int QMargins:: bottom () const

返回下边距。

另请参阅 setBottom ().

bool QMargins:: isNull () const

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

int QMargins:: left () const

返回左边距。

另请参阅 setLeft ().

返回右边距。

另请参阅 setRight ().

void QMargins:: setBottom ( int bottom )

将下边距设为 bottom .

另请参阅 bottom ().

void QMargins:: setLeft ( int left )

将左边距设为 left .

另请参阅 left ().

void QMargins:: setRight ( int right )

将右边距设为 right .

另请参阅 right ().

void QMargins:: setTop ( int Top )

将上边距设为 Top .

另请参阅 top ().

int QMargins:: top () const

Returns the top margin.

另请参阅 setTop ().

相关非成员

bool operator!= (const QMargins & m1 , const QMargins & m2 )

返回 true 若 m1 and m2 are different; otherwise returns false.

bool operator== (const QMargins & m1 , const QMargins & m2 )

返回 true 若 m1 and m2 相等;否则返回 false。