QMargins#
The QMargins
class defines the four margins of a rectangle. More…
New in version 4.6.
Synopsis#
Functions#
def
bottom
()def
isNull
()def
left
()def
__ne__
(m2)def
__mul__
(factor)def
__mul__
(factor)def
__mul__
(factor)def
__mul__
(factor)def
__imul__
(arg__1)def
__imul__
(arg__1)def
__add__
()def
__add__
(m2)def
__add__
(lhs)def
__add__
(rhs)def
__iadd__
(margins)def
__iadd__
(arg__1)def
__sub__
(rhs)def
__sub__
(m2)def
__sub__
()def
__isub__
(margins)def
__isub__
(arg__1)def
__div__
(divisor)def
__div__
(divisor)def
operator/=
(arg__1)def
operator/=
(arg__1)def
__eq__
(m2)def
__or__
(m2)def
right
()def
setBottom
(bottom)def
setLeft
(left)def
setRight
(right)def
setTop
(top)def
toMarginsF
()def
top
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
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.
- class PySide6.QtCore.QMargins#
PySide6.QtCore.QMargins(left, top, right, bottom)
- Parameters:
left – int
bottom – int
top – int
right – int
Constructs a margins object with all margins set to 0.
See also
Constructs margins with the given left
, top
, right
, and bottom
See also
- PySide6.QtCore.QMargins.bottom()#
- Return type:
int
Returns the bottom margin.
See also
- PySide6.QtCore.QMargins.isNull()#
- Return type:
bool
Returns true
if all margins are is 0; otherwise returns false.
- PySide6.QtCore.QMargins.left()#
- Return type:
int
Returns the left margin.
See also
- PySide6.QtCore.QMargins.__ne__(m2)#
- Parameters:
- Return type:
bool
Returns true
if m1
and m2
are different; otherwise returns false
.
- PySide6.QtCore.QMargins.__mul__(factor)#
- Parameters:
factor – int
- Return type:
Returns a QMargins
object that is formed by multiplying each component of the given margins
by factor
.
See also
operator*=()
operator/=()
- PySide6.QtCore.QMargins.__mul__(factor)
- Parameters:
factor – int
- Return type:
This is an overloaded function.
Returns a QMargins
object that is formed by multiplying each component of the given margins
by factor
.
See also
operator*=()
operator/=()
- PySide6.QtCore.QMargins.__mul__(factor)
- Parameters:
factor – float
- Return type:
This is an overloaded function.
Returns a QMargins
object that is formed by multiplying each component of the given margins
by factor
.
See also
operator*=()
operator/=()
- PySide6.QtCore.QMargins.__mul__(factor)
- Parameters:
factor – float
- Return type:
This is an overloaded function.
Returns a QMargins
object that is formed by multiplying each component of the given margins
by factor
.
See also
operator*=()
operator/=()
- PySide6.QtCore.QMargins.__imul__(arg__1)#
- Parameters:
arg__1 – int
- Return type:
Multiplies each component of this object by factor
and returns a reference to it.
See also
operator/=()
- PySide6.QtCore.QMargins.__imul__(arg__1)
- Parameters:
arg__1 – float
- Return type:
This is an overloaded function.
Multiplies each component of this object by factor
and returns a reference to it.
See also
operator/=()
- PySide6.QtCore.QMargins.__add__()#
- Return type:
Returns a QMargin object that is formed from all components of margins
.
- PySide6.QtCore.QMargins.__add__(m2)
- Parameters:
- Return type:
Returns a QMargins
object that is the sum of the given margins, m1
and m2
; each component is added separately.
See also
operator+=()
operator-=()
- PySide6.QtCore.QMargins.__add__(lhs)
- Parameters:
lhs – int
- Return type:
Returns a QMargins
object that is formed by adding lhs
to rhs
.
See also
operator+=()
operator-=()
- PySide6.QtCore.QMargins.__add__(rhs)
- Parameters:
rhs – int
- Return type:
Returns a QMargins
object that is formed by adding rhs
to lhs
.
See also
operator+=()
operator-=()
- PySide6.QtCore.QMargins.__iadd__(margins)#
- Parameters:
margins –
PySide6.QtCore.QMargins
- Return type:
Add each component of margins
to the respective component of this object and returns a reference to it.
See also
operator-=()
- PySide6.QtCore.QMargins.__iadd__(arg__1)
- Parameters:
arg__1 – int
- Return type:
This is an overloaded function.
Adds the addend
to each component of this object and returns a reference to it.
See also
operator-=()
- PySide6.QtCore.QMargins.__sub__(rhs)#
- Parameters:
rhs – int
- Return type:
Returns a QMargins
object that is formed by subtracting rhs
from lhs
.
See also
operator+=()
operator-=()
- PySide6.QtCore.QMargins.__sub__(m2)
- Parameters:
- Return type:
Returns a QMargins
object that is formed by subtracting m2
from m1
; each component is subtracted separately.
See also
operator+=()
operator-=()
- PySide6.QtCore.QMargins.__sub__()
- Return type:
Returns a QMargin object that is formed by negating all components of margins
.
- PySide6.QtCore.QMargins.__isub__(margins)#
- Parameters:
margins –
PySide6.QtCore.QMargins
- Return type:
Subtract each component of margins
from the respective component of this object and returns a reference to it.
See also
operator+=()
- PySide6.QtCore.QMargins.__isub__(arg__1)
- Parameters:
arg__1 – int
- Return type:
This is an overloaded function.
Subtracts the subtrahend
from each component of this object and returns a reference to it.
See also
operator+=()
- PySide6.QtCore.QMargins.__div__(divisor)#
- Parameters:
divisor – int
- Return type:
Returns a QMargins
object that is formed by dividing the components of the given margins
by the given divisor
.
See also
operator*=()
operator/=()
- PySide6.QtCore.QMargins.__div__(divisor)
- Parameters:
divisor – float
- Return type:
This is an overloaded function.
Returns a QMargins
object that is formed by dividing the components of the given margins
by the given divisor
.
See also
operator*=()
operator/=()
- PySide6.QtCore.QMargins.operator/=(arg__1)
- Parameters:
arg__1 – int
- Return type:
Divides each component of this object by divisor
and returns a reference to it.
See also
operator*=()
- PySide6.QtCore.QMargins.operator/=(arg__1)
- Parameters:
arg__1 – float
- Return type:
This is an overloaded function.
See also
operator*=()
- PySide6.QtCore.QMargins.__eq__(m2)#
- Parameters:
- Return type:
bool
Returns true
if m1
and m2
are equal; otherwise returns false
.
- PySide6.QtCore.QMargins.__or__(m2)#
- Parameters:
- Return type:
Returns a QMargins
object that is formed from the maximum of each component of m2
and m1
.
See also
operator+=()
operator-=()
- PySide6.QtCore.QMargins.right()#
- Return type:
int
Returns the right margin.
See also
- PySide6.QtCore.QMargins.setBottom(bottom)#
- Parameters:
bottom – int
Sets the bottom margin to bottom
.
See also
- PySide6.QtCore.QMargins.setLeft(left)#
- Parameters:
left – int
Sets the left margin to left
.
See also
- PySide6.QtCore.QMargins.setRight(right)#
- Parameters:
right – int
Sets the right margin to right
.
See also
- PySide6.QtCore.QMargins.setTop(top)#
- Parameters:
top – int
Sets the Top margin to Top
.
See also
- PySide6.QtCore.QMargins.toMarginsF()#
- Return type:
Returns these margins as margins with floating point accuracy.
See also
- PySide6.QtCore.QMargins.top()#
- Return type:
int
Returns the top margin.
See also