QMarginsF¶
The QMarginsF
class defines the four margins of a rectangle. More…
New in version 5.3.
Synopsis¶
Functions¶
def
__add__
()def
__add__
(lhs)def
__add__
(rhs)def
__add__
(rhs)def
__div__
(divisor)def
__eq__
(rhs)def
__iadd__
(addend)def
__iadd__
(margins)def
__idiv__
(divisor)def
__imul__
(factor)def
__isub__
(margins)def
__isub__
(subtrahend)def
__mul__
(lhs)def
__mul__
(rhs)def
__ne__
(rhs)def
__or__
(m2)def
__sub__
()def
__sub__
(rhs)def
__sub__
(rhs)def
bottom
()def
isNull
()def
left
()def
right
()def
setBottom
(abottom)def
setLeft
(aleft)def
setRight
(aright)def
setTop
(atop)def
toMargins
()def
top
()
Detailed Description¶
QMarginsF
defines a set of four margins; left, top, right, and bottom, that describe the finite size of the borders surrounding a rectangle.
The isNull()
function returns true
only if all margins are very close to zero.
QMarginsF
objects can be streamed as well as compared.
- class PySide6.QtCore.QMarginsF¶
PySide6.QtCore.QMarginsF(margins)
PySide6.QtCore.QMarginsF(QMarginsF)
PySide6.QtCore.QMarginsF(left, top, right, bottom)
- Parameters
margins –
PySide6.QtCore.QMargins
left – float
right – float
bottom – float
top – float
QMarginsF –
PySide6.QtCore.QMarginsF
Constructs a margins object with all margins set to 0.
See also
Constructs margins copied from the given margins
Constructs margins with the given left
, top
, right
, and bottom
. All parameters must be finite.
See also
- PySide6.QtCore.QMarginsF.bottom()¶
- Return type
float
Returns the bottom margin.
See also
- PySide6.QtCore.QMarginsF.isNull()¶
- Return type
bool
Returns true
if all margins are very close to 0; otherwise returns false.
See also
qFuzzyIsNull
- PySide6.QtCore.QMarginsF.left()¶
- Return type
float
Returns the left margin.
See also
- PySide6.QtCore.QMarginsF.__ne__(rhs)¶
- Parameters
rhs –
PySide6.QtCore.QMarginsF
- Return type
bool
- PySide6.QtCore.QMarginsF.__mul__(lhs)¶
- Parameters
lhs – float
- Return type
- PySide6.QtCore.QMarginsF.__mul__(rhs)
- Parameters
rhs – float
- Return type
- PySide6.QtCore.QMarginsF.__imul__(factor)¶
- Parameters
factor – float
- Return type
Multiplies each component of this object by the given finite factor
and returns a reference to this object.
See also
operator/=()
- PySide6.QtCore.QMarginsF.__add__()¶
- Return type
- PySide6.QtCore.QMarginsF.__add__(rhs)
- Parameters
rhs –
PySide6.QtCore.QMarginsF
- Return type
Returns a QMargin object that is formed from all components of margins
.
- PySide6.QtCore.QMarginsF.__add__(lhs)
- Parameters
lhs – float
- Return type
Returns a QMargin object that is formed from all components of margins
.
- PySide6.QtCore.QMarginsF.__add__(rhs)
- Parameters
rhs – float
- Return type
Returns a QMargin object that is formed from all components of margins
.
- PySide6.QtCore.QMarginsF.__iadd__(addend)¶
- Parameters
addend – float
- Return type
This is an overloaded function.
Adds the given finite addend
to each component of this object and returns a reference to it.
See also
operator-=()
- PySide6.QtCore.QMarginsF.__iadd__(margins)
- Parameters
margins –
PySide6.QtCore.QMarginsF
- 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.QMarginsF.__sub__()¶
- Return type
- PySide6.QtCore.QMarginsF.__sub__(rhs)
- Parameters
rhs –
PySide6.QtCore.QMarginsF
- Return type
Returns a QMargin object that is formed by negating all components of margins
.
- PySide6.QtCore.QMarginsF.__sub__(rhs)
- Parameters
rhs – float
- Return type
Returns a QMargin object that is formed by negating all components of margins
.
- PySide6.QtCore.QMarginsF.__isub__(margins)¶
- Parameters
margins –
PySide6.QtCore.QMarginsF
- 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.QMarginsF.__isub__(subtrahend)
- Parameters
subtrahend – float
- Return type
This is an overloaded function.
Subtracts the given finite subtrahend
from each component of this object and returns a reference to it.
See also
operator+=()
- PySide6.QtCore.QMarginsF.__div__(divisor)¶
- Parameters
divisor – float
- Return type
- PySide6.QtCore.QMarginsF.__idiv__(divisor)¶
- Parameters
divisor – float
- Return type
Divides each component of this object by divisor
and returns a reference to this object.
The divisor
must not be either zero or NaN.
See also
operator*=()
- PySide6.QtCore.QMarginsF.__eq__(rhs)¶
- Parameters
rhs –
PySide6.QtCore.QMarginsF
- Return type
bool
- PySide6.QtCore.QMarginsF.__or__(m2)¶
- Parameters
- Return type
- PySide6.QtCore.QMarginsF.right()¶
- Return type
float
Returns the right margin.
See also
- PySide6.QtCore.QMarginsF.setBottom(abottom)¶
- Parameters
abottom – float
Sets the bottom margin to abottom
(which must be finite).
See also
- PySide6.QtCore.QMarginsF.setLeft(aleft)¶
- Parameters
aleft – float
Sets the left margin to aleft
(which must be finite).
See also
- PySide6.QtCore.QMarginsF.setRight(aright)¶
- Parameters
aright – float
Sets the right margin to aright
(which must be finite).
See also
- PySide6.QtCore.QMarginsF.setTop(atop)¶
- Parameters
atop – float
Sets the top margin to atop
(which must be finite).
See also
- PySide6.QtCore.QMarginsF.toMargins()¶
- Return type
Returns an integer-based copy of this margins object.
Note that the components in the returned margins will be rounded to the nearest integer.
See also
QMarginsF()
- PySide6.QtCore.QMarginsF.top()¶
- Return type
float
Returns the top margin.
See also