Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 596

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qrect.cpp -->
  <title>QRectF Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QRectF</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#rendering">Rendering</a></li>
<li class="level2"><a href="#coordinates">Coordinates</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QRectF Class</h1>
<!-- $$$QRectF-brief -->
<p>The <a href="qrectf.html">QRectF</a> class defines a rectangle in the plane using floating point precision. <a href="#details">More...</a></p>
<!-- @@@QRectF -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QRectF&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr></table></div><ul>
<li><a href="qrectf-members.html">List of all members, including inherited members</a></li>
<li><a href="qrectf-obsolete.html">Obsolete members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are reentrant.</p>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#QRectF">QRectF</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#QRectF-1">QRectF</a></b>(const QPointF &amp;<i>topLeft</i>, const QSizeF &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#QRectF-2">QRectF</a></b>(const QPointF &amp;<i>topLeft</i>, const QPointF &amp;<i>bottomRight</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#QRectF-3">QRectF</a></b>(qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#QRectF-4">QRectF</a></b>(const QRect &amp;<i>rectangle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#adjust">adjust</a></b>(qreal <i>dx1</i>, qreal <i>dy1</i>, qreal <i>dx2</i>, qreal <i>dy2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#adjusted">adjusted</a></b>(qreal <i>dx1</i>, qreal <i>dy1</i>, qreal <i>dx2</i>, qreal <i>dy2</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#bottom">bottom</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#bottomLeft">bottomLeft</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#bottomRight">bottomRight</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#center">center</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#contains">contains</a></b>(const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#contains-1">contains</a></b>(const QRectF &amp;<i>rectangle</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#contains-2">contains</a></b>(qreal <i>x</i>, qreal <i>y</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#getCoords">getCoords</a></b>(qreal *<i>x1</i>, qreal *<i>y1</i>, qreal *<i>x2</i>, qreal *<i>y2</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#getRect">getRect</a></b>(qreal *<i>x</i>, qreal *<i>y</i>, qreal *<i>width</i>, qreal *<i>height</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#height">height</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#intersected">intersected</a></b>(const QRectF &amp;<i>rectangle</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#intersects">intersects</a></b>(const QRectF &amp;<i>rectangle</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#isEmpty">isEmpty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#isNull">isNull</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#left">left</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#marginsAdded">marginsAdded</a></b>(const QMarginsF &amp;<i>margins</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#marginsRemoved">marginsRemoved</a></b>(const QMarginsF &amp;<i>margins</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveBottom">moveBottom</a></b>(qreal <i>y</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveBottomLeft">moveBottomLeft</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveBottomRight">moveBottomRight</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveCenter">moveCenter</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveLeft">moveLeft</a></b>(qreal <i>x</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveRight">moveRight</a></b>(qreal <i>x</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveTo">moveTo</a></b>(qreal <i>x</i>, qreal <i>y</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveTo-1">moveTo</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveTop">moveTop</a></b>(qreal <i>y</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveTopLeft">moveTopLeft</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#moveTopRight">moveTopRight</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#normalized">normalized</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#right">right</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setBottom">setBottom</a></b>(qreal <i>y</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setBottomLeft">setBottomLeft</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setBottomRight">setBottomRight</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setCoords">setCoords</a></b>(qreal <i>x1</i>, qreal <i>y1</i>, qreal <i>x2</i>, qreal <i>y2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setHeight">setHeight</a></b>(qreal <i>height</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setLeft">setLeft</a></b>(qreal <i>x</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setRect">setRect</a></b>(qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setRight">setRight</a></b>(qreal <i>x</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setSize">setSize</a></b>(const QSizeF &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setTop">setTop</a></b>(qreal <i>y</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setTopLeft">setTopLeft</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setTopRight">setTopRight</a></b>(const QPointF &amp;<i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setWidth">setWidth</a></b>(qreal <i>width</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setX">setX</a></b>(qreal <i>x</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#setY">setY</a></b>(qreal <i>y</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#size">size</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#toAlignedRect">toAlignedRect</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> CGRect </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#toCGRect">toCGRect</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#toRect">toRect</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#top">top</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#topLeft">topLeft</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#topRight">topRight</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#translate">translate</a></b>(qreal <i>dx</i>, qreal <i>dy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#translate-1">translate</a></b>(const QPointF &amp;<i>offset</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#translated">translated</a></b>(qreal <i>dx</i>, qreal <i>dy</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#translated-1">translated</a></b>(const QPointF &amp;<i>offset</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#transposed">transposed</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#united">united</a></b>(const QRectF &amp;<i>rectangle</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#width">width</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#x">x</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#y">y</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-and">operator&amp;</a></b>(const QRectF &amp;<i>rectangle</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-and-eq">operator&amp;=</a></b>(const QRectF &amp;<i>rectangle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-2b-eq">operator+=</a></b>(const QMarginsF &amp;<i>margins</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator--eq">operator-=</a></b>(const QMarginsF &amp;<i>margins</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-7c">operator|</a></b>(const QRectF &amp;<i>rectangle</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-7c-eq">operator|=</a></b>(const QRectF &amp;<i>rectangle</i>)</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#fromCGRect">fromCGRect</a></b>(CGRect <i>rect</i>)</td></tr>
</table></div>
<a name="related-non-members"></a>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-not-eq">operator!=</a></b>(const QRectF &amp;<i>r1</i>, const QRectF &amp;<i>r2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-2b">operator+</a></b>(const QRectF &amp;<i>lhs</i>, const QMarginsF &amp;<i>rhs</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-2b-1">operator+</a></b>(const QMarginsF &amp;<i>lhs</i>, const QRectF &amp;<i>rhs</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-">operator-</a></b>(const QRectF &amp;<i>lhs</i>, const QMarginsF &amp;<i>rhs</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-lt-lt">operator&lt;&lt;</a></b>(QDataStream &amp;<i>stream</i>, const QRectF &amp;<i>rectangle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-eq-eq">operator==</a></b>(const QRectF &amp;<i>r1</i>, const QRectF &amp;<i>r2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrectf.html#operator-gt-gt">operator&gt;&gt;</a></b>(QDataStream &amp;<i>stream</i>, QRectF &amp;<i>rectangle</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QRectF-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qrectf.html">QRectF</a> class defines a rectangle in the plane using floating point precision.</p>
<p>A rectangle is normally expressed as an upper-left corner and a size. The size (width and height) of a <a href="qrectf.html">QRectF</a> is always equivalent to the mathematical rectangle that forms the basis for its rendering.</p>
<p>A <a href="qrectf.html">QRectF</a> can be constructed with a set of left, top, width and height coordinates, or from a <a href="qpointf.html">QPointF</a> and a <a href="qsizef.html">QSizeF</a>. The following code creates two identical rectangles.</p>
<pre class="cpp">

  <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> r1(<span class="number">100.0</span><span class="operator">,</span> <span class="number">200.1</span><span class="operator">,</span> <span class="number">11.2</span><span class="operator">,</span> <span class="number">16.3</span>);
  <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> r2(<span class="type"><a href="qpointf.html">QPointF</a></span>(<span class="number">100.0</span><span class="operator">,</span> <span class="number">200.1</span>)<span class="operator">,</span> <span class="type"><a href="qsizef.html">QSizeF</a></span>(<span class="number">11.2</span><span class="operator">,</span> <span class="number">16.3</span>));

</pre>
<p>There is also a third constructor creating a <a href="qrectf.html">QRectF</a> from a <a href="qrect.html">QRect</a>, and a corresponding <a href="qrectf.html#toRect">toRect</a>() function that returns a <a href="qrect.html">QRect</a> object based on the values of this rectangle (note that the coordinates in the returned rectangle are rounded to the nearest integer).</p>
<p>The <a href="qrectf.html">QRectF</a> class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. <a href="qrectf.html">QRectF</a> also provide functions to move the rectangle relative to the various coordinates. In addition there is a <a href="qrectf.html#moveTo">moveTo</a>() function that moves the rectangle, leaving its top left corner at the given coordinates. Alternatively, the <a href="qrectf.html#translate">translate</a>() function moves the rectangle the given offset relative to the current position, and the <a href="qrectf.html#translated">translated</a>() function returns a translated copy of this rectangle.</p>
<p>The <a href="qrectf.html#size">size</a>() function returns the rectange's dimensions as a <a href="qsizef.html">QSizeF</a>. The dimensions can also be retrieved separately using the <a href="qrectf.html#width">width</a>() and <a href="qrectf.html#height">height</a>() functions. To manipulate the dimensions use the <a href="qrectf.html#setSize">setSize</a>(), <a href="qrectf.html#setWidth">setWidth</a>() or <a href="qrectf.html#setHeight">setHeight</a>() functions. Alternatively, the size can be changed by applying either of the functions setting the rectangle coordinates, for example, <a href="qrectf.html#setBottom">setBottom</a>() or <a href="qrectf.html#setRight">setRight</a>().</p>
<p>The <a href="qrectf.html#contains">contains</a>() function tells whether a given point is inside the rectangle or not, and the <a href="qrectf.html#intersects">intersects</a>() function returns <code>true</code> if this rectangle intersects with a given rectangle (otherwise false). The <a href="qrectf.html">QRectF</a> class also provides the <a href="qrectf.html#intersected">intersected</a>() function which returns the intersection rectangle, and the <a href="qrectf.html#united">united</a>() function which returns the rectangle that encloses the given rectangle and this:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/qrect-intersect.png" alt="" /></td><td ><img src="images/qrect-unite.png" alt="" /></td></tr>
<tr valign="top" class="even"><td ><a href="qrectf.html#intersected">intersected</a>()</td><td ><a href="qrectf.html#united">united</a>()</td></tr>
</table></div>
<p>The <a href="qrectf.html#isEmpty">isEmpty</a>() function returns <code>true</code> if the rectangle's width or height is less than, or equal to, 0. Note that an empty rectangle is not valid: The <a href="qrectf.html#isValid">isValid</a>() function returns <code>true</code> if both width and height is larger than 0. A null rectangle (<a href="qrectf.html#isNull">isNull</a>() == true) on the other hand, has both width and height set to 0.</p>
<p>Note that due to the way <a href="qrect.html">QRect</a> and <a href="qrectf.html">QRectF</a> are defined, an empty <a href="qrectf.html">QRectF</a> is defined in essentially the same way as <a href="qrect.html">QRect</a>.</p>
<p>Finally, <a href="qrectf.html">QRectF</a> objects can be streamed as well as compared.</p>
<a name="rendering"></a>
<h3 >Rendering</h3>
<p>When using an <a href="../qtgui/qpainter.html#RenderHint-enum">anti-aliased</a> painter, the boundary line of a <a href="qrectf.html">QRectF</a> will be rendered symmetrically on both sides of the mathematical rectangle's boundary line. But when using an aliased painter (the default) other rules apply.</p>
<p>Then, when rendering with a one pixel wide pen the <a href="qrectf.html">QRectF</a>'s boundary line will be rendered to the right and below the mathematical rectangle's boundary line.</p>
<p>When rendering with a two pixels wide pen the boundary line will be split in the middle by the mathematical rectangle. This will be the case whenever the pen is set to an even number of pixels, while rendering with a pen with an odd number of pixels, the spare pixel will be rendered to the right and below the mathematical rectangle as in the one pixel case.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/qrect-diagram-zero.png" alt="" /></td><td ><img src="images/qrectf-diagram-one.png" alt="" /></td></tr>
<tr valign="top" class="even"><td >Logical representation</td><td >One pixel wide pen</td></tr>
<tr valign="top" class="odd"><td ><img src="images/qrectf-diagram-two.png" alt="" /></td><td ><img src="images/qrectf-diagram-three.png" alt="" /></td></tr>
<tr valign="top" class="even"><td >Two pixel wide pen</td><td >Three pixel wide pen</td></tr>
</table></div>
<a name="coordinates"></a>
<h3 >Coordinates</h3>
<p>The <a href="qrectf.html">QRectF</a> class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. <a href="qrectf.html">QRectF</a> also provide functions to move the rectangle relative to the various coordinates.</p>
<p>For example: the <a href="qrectf.html#bottom">bottom</a>(), <a href="qrectf.html#setBottom">setBottom</a>() and <a href="qrectf.html#moveBottom">moveBottom</a>() functions: <a href="qrectf.html#bottom">bottom</a>() returns the y-coordinate of the rectangle's bottom edge, <a href="qrectf.html#setBottom">setBottom</a>() sets the bottom edge of the rectangle to the given y coordinate (it may change the height, but will never change the rectangle's top edge) and <a href="qrectf.html#moveBottom">moveBottom</a>() moves the entire rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate and its size unchanged.</p>
<p class="centerAlign"><img src="images/qrectf-coordinates.png" alt="" /></p><p>It is also possible to add offsets to this rectangle's coordinates using the <a href="qrectf.html#adjust">adjust</a>() function, as well as retrieve a new rectangle based on adjustments of the original one using the <a href="qrectf.html#adjusted">adjusted</a>() function. If either of the width and height is negative, use the <a href="qrectf.html#normalized">normalized</a>() function to retrieve a rectangle where the corners are swapped.</p>
<p>In addition, <a href="qrectf.html">QRectF</a> provides the <a href="qrectf.html#getCoords">getCoords</a>() function which extracts the position of the rectangle's top-left and bottom-right corner, and the <a href="qrectf.html#getRect">getRect</a>() function which extracts the rectangle's top-left corner, width and height. Use the <a href="qrectf.html#setCoords">setCoords</a>() and <a href="qrectf.html#setRect">setRect</a>() function to manipulate the rectangle's coordinates and dimensions in one go.</p>
</div>
<p><b>See also </b><a href="qrect.html">QRect</a> and <a href="../qtgui/qregion.html">QRegion</a>.</p>
<!-- @@@QRectF -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QRectF[overload1]$$$QRectF -->
<h3 class="fn" id="QRectF"><a name="QRectF"></a>QRectF::<span class="name">QRectF</span>()</h3>
<p>Constructs a null rectangle.</p>
<p><b>See also </b><a href="qrectf.html#isNull">isNull</a>().</p>
<!-- @@@QRectF -->
<!-- $$$QRectF$$$QRectFconstQPointF&constQSizeF& -->
<h3 class="fn" id="QRectF-1"><a name="QRectF-1"></a>QRectF::<span class="name">QRectF</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>topLeft</i>, const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp;<i>size</i>)</h3>
<p>Constructs a rectangle with the given <i>topLeft</i> corner and the given <i>size</i>.</p>
<p><b>See also </b><a href="qrectf.html#setTopLeft">setTopLeft</a>() and <a href="qrectf.html#setSize">setSize</a>().</p>
<!-- @@@QRectF -->
<!-- $$$QRectF$$$QRectFconstQPointF&constQPointF& -->
<h3 class="fn" id="QRectF-2"><a name="QRectF-2"></a>QRectF::<span class="name">QRectF</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>topLeft</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>bottomRight</i>)</h3>
<p>Constructs a rectangle with the given <i>topLeft</i> and <i>bottomRight</i> corners.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qrectf.html#setTopLeft">setTopLeft</a>() and <a href="qrectf.html#setBottomRight">setBottomRight</a>().</p>
<!-- @@@QRectF -->
<!-- $$$QRectF$$$QRectFqrealqrealqrealqreal -->
<h3 class="fn" id="QRectF-3"><a name="QRectF-3"></a>QRectF::<span class="name">QRectF</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i>)</h3>
<p>Constructs a rectangle with (<i>x</i>, <i>y</i>) as its top-left corner and the given <i>width</i> and <i>height</i>.</p>
<p><b>See also </b><a href="qrectf.html#setRect">setRect</a>().</p>
<!-- @@@QRectF -->
<!-- $$$QRectF$$$QRectFconstQRect& -->
<h3 class="fn" id="QRectF-4"><a name="QRectF-4"></a>QRectF::<span class="name">QRectF</span>(const <span class="type"><a href="qrect.html">QRect</a></span> &amp;<i>rectangle</i>)</h3>
<p>Constructs a <a href="qrectf.html">QRectF</a> rectangle from the given <a href="qrect.html">QRect</a> <i>rectangle</i>.</p>
<p><b>See also </b><a href="qrectf.html#toRect">toRect</a>().</p>
<!-- @@@QRectF -->
<!-- $$$adjust[overload1]$$$adjustqrealqrealqrealqreal -->
<h3 class="fn" id="adjust"><a name="adjust"></a><span class="type">void</span> QRectF::<span class="name">adjust</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx2</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy2</i>)</h3>
<p>Adds <i>dx1</i>, <i>dy1</i>, <i>dx2</i> and <i>dy2</i> respectively to the existing coordinates of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#adjusted">adjusted</a>() and <a href="qrectf.html#setRect">setRect</a>().</p>
<!-- @@@adjust -->
<!-- $$$adjusted[overload1]$$$adjustedqrealqrealqrealqreal -->
<h3 class="fn" id="adjusted"><a name="adjusted"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">adjusted</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx2</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy2</i>) const</h3>
<p>Returns a new rectangle with <i>dx1</i>, <i>dy1</i>, <i>dx2</i> and <i>dy2</i> added respectively to the existing coordinates of this rectangle.</p>
<p><b>See also </b><a href="qrectf.html#adjust">adjust</a>().</p>
<!-- @@@adjusted -->
<!-- $$$bottom[overload1]$$$bottom -->
<h3 class="fn" id="bottom"><a name="bottom"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">bottom</span>() const</h3>
<p>Returns the y-coordinate of the rectangle's bottom edge.</p>
<p><b>See also </b><a href="qrectf.html#setBottom">setBottom</a>(), <a href="qrectf.html#bottomLeft">bottomLeft</a>(), and <a href="qrectf.html#bottomRight">bottomRight</a>().</p>
<!-- @@@bottom -->
<!-- $$$bottomLeft[overload1]$$$bottomLeft -->
<h3 class="fn" id="bottomLeft"><a name="bottomLeft"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QRectF::<span class="name">bottomLeft</span>() const</h3>
<p>Returns the position of the rectangle's bottom-left corner.</p>
<p><b>See also </b><a href="qrectf.html#setBottomLeft">setBottomLeft</a>(), <a href="qrectf.html#bottom">bottom</a>(), and <a href="qrectf.html#left">left</a>().</p>
<!-- @@@bottomLeft -->
<!-- $$$bottomRight[overload1]$$$bottomRight -->
<h3 class="fn" id="bottomRight"><a name="bottomRight"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QRectF::<span class="name">bottomRight</span>() const</h3>
<p>Returns the position of the rectangle's bottom-right corner.</p>
<p><b>See also </b><a href="qrectf.html#setBottomRight">setBottomRight</a>(), <a href="qrectf.html#bottom">bottom</a>(), and <a href="qrectf.html#right">right</a>().</p>
<!-- @@@bottomRight -->
<!-- $$$center[overload1]$$$center -->
<h3 class="fn" id="center"><a name="center"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QRectF::<span class="name">center</span>() const</h3>
<p>Returns the center point of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#moveCenter">moveCenter</a>().</p>
<!-- @@@center -->
<!-- $$$contains[overload1]$$$containsconstQPointF& -->
<h3 class="fn" id="contains"><a name="contains"></a><span class="type">bool</span> QRectF::<span class="name">contains</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>point</i>) const</h3>
<p>Returns <code>true</code> if the given <i>point</i> is inside or on the edge of the rectangle; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qrectf.html#intersects">intersects</a>().</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsconstQRectF& -->
<h3 class="fn" id="contains-1"><a name="contains-1"></a><span class="type">bool</span> QRectF::<span class="name">contains</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns <code>true</code> if the given <i>rectangle</i> is inside this rectangle; otherwise returns <code>false</code>.</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsqrealqreal -->
<h3 class="fn" id="contains-2"><a name="contains-2"></a><span class="type">bool</span> QRectF::<span class="name">contains</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns <code>true</code> if the point (<i>x</i>, <i>y</i>) is inside or on the edge of the rectangle; otherwise returns <code>false</code>.</p>
<!-- @@@contains -->
<!-- $$$fromCGRect[overload1]$$$fromCGRectCGRect -->
<h3 class="fn" id="fromCGRect"><a name="fromCGRect"></a><code>[static] </code><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">fromCGRect</span>(<span class="type">CGRect</span> <i>rect</i>)</h3>
<p>Creates a <a href="qrectf.html">QRectF</a> from CGRect <i>rect</i>.</p>
<p>This function was introduced in  Qt 5.8.</p>
<p><b>See also </b><a href="qrectf.html#toCGRect">toCGRect</a>().</p>
<!-- @@@fromCGRect -->
<!-- $$$getCoords[overload1]$$$getCoordsqreal*qreal*qreal*qreal* -->
<h3 class="fn" id="getCoords"><a name="getCoords"></a><span class="type">void</span> QRectF::<span class="name">getCoords</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>x1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>y1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>x2</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>y2</i>) const</h3>
<p>Extracts the position of the rectangle's top-left corner to *<i>x1</i> and *<i>y1</i>, and the position of the bottom-right corner to *<i>x2</i> and *<i>y2</i>.</p>
<p><b>See also </b><a href="qrectf.html#setCoords">setCoords</a>() and <a href="qrectf.html#getRect">getRect</a>().</p>
<!-- @@@getCoords -->
<!-- $$$getRect[overload1]$$$getRectqreal*qreal*qreal*qreal* -->
<h3 class="fn" id="getRect"><a name="getRect"></a><span class="type">void</span> QRectF::<span class="name">getRect</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> *<i>height</i>) const</h3>
<p>Extracts the position of the rectangle's top-left corner to *<i>x</i> and *<i>y</i>, and its dimensions to *<i>width</i> and *<i>height</i>.</p>
<p><b>See also </b><a href="qrectf.html#setRect">setRect</a>() and <a href="qrectf.html#getCoords">getCoords</a>().</p>
<!-- @@@getRect -->
<!-- $$$height[overload1]$$$height -->
<h3 class="fn" id="height"><a name="height"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">height</span>() const</h3>
<p>Returns the height of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#setHeight">setHeight</a>(), <a href="qrectf.html#width">width</a>(), and <a href="qrectf.html#size">size</a>().</p>
<!-- @@@height -->
<!-- $$$intersected[overload1]$$$intersectedconstQRectF& -->
<h3 class="fn" id="intersected"><a name="intersected"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">intersected</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>) const</h3>
<p>Returns the intersection of this rectangle and the given <i>rectangle</i>. Note that <code>r.intersected(s)</code> is equivalent to <code>r &amp; s</code>.</p>
<p class="centerAlign"><img src="images/qrect-intersect.png" alt="" /></p><p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qrectf.html#intersects">intersects</a>(), <a href="qrectf.html#united">united</a>(), and <a href="qrectf.html#operator-and-eq">operator&amp;=</a>().</p>
<!-- @@@intersected -->
<!-- $$$intersects[overload1]$$$intersectsconstQRectF& -->
<h3 class="fn" id="intersects"><a name="intersects"></a><span class="type">bool</span> QRectF::<span class="name">intersects</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>) const</h3>
<p>Returns <code>true</code> if this rectangle intersects with the given <i>rectangle</i> (i.e&#x2e; there is a non-empty area of overlap between them), otherwise returns <code>false</code>.</p>
<p>The intersection rectangle can be retrieved using the <a href="qrectf.html#intersected">intersected</a>() function.</p>
<p><b>See also </b><a href="qrectf.html#contains">contains</a>().</p>
<!-- @@@intersects -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QRectF::<span class="name">isEmpty</span>() const</h3>
<p>Returns <code>true</code> if the rectangle is empty, otherwise returns <code>false</code>.</p>
<p>An empty rectangle has <a href="qrectf.html#width">width</a>() &lt;= 0 or <a href="qrectf.html#height">height</a>() &lt;= 0. An empty rectangle is not valid (i.e&#x2e;, isEmpty() == !<a href="qrectf.html#isValid">isValid</a>()).</p>
<p>Use the <a href="qrectf.html#normalized">normalized</a>() function to retrieve a rectangle where the corners are swapped.</p>
<p><b>See also </b><a href="qrectf.html#isNull">isNull</a>(), <a href="qrectf.html#isValid">isValid</a>(), and <a href="qrectf.html#normalized">normalized</a>().</p>
<!-- @@@isEmpty -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn" id="isNull"><a name="isNull"></a><span class="type">bool</span> QRectF::<span class="name">isNull</span>() const</h3>
<p>Returns <code>true</code> if the rectangle is a null rectangle, otherwise returns <code>false</code>.</p>
<p>A null rectangle has both the width and the height set to 0. A null rectangle is also empty, and hence not valid.</p>
<p><b>See also </b><a href="qrectf.html#isEmpty">isEmpty</a>() and <a href="qrectf.html#isValid">isValid</a>().</p>
<!-- @@@isNull -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QRectF::<span class="name">isValid</span>() const</h3>
<p>Returns <code>true</code> if the rectangle is valid, otherwise returns <code>false</code>.</p>
<p>A valid rectangle has a <a href="qrectf.html#width">width</a>() &gt; 0 and <a href="qrectf.html#height">height</a>() &gt; 0. Note that non-trivial operations like intersections are not defined for invalid rectangles. A valid rectangle is not empty (i.e&#x2e;, isValid() == !<a href="qrectf.html#isEmpty">isEmpty</a>()).</p>
<p><b>See also </b><a href="qrectf.html#isNull">isNull</a>(), <a href="qrectf.html#isEmpty">isEmpty</a>(), and <a href="qrectf.html#normalized">normalized</a>().</p>
<!-- @@@isValid -->
<!-- $$$left[overload1]$$$left -->
<h3 class="fn" id="left"><a name="left"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">left</span>() const</h3>
<p>Returns the x-coordinate of the rectangle's left edge. Equivalent to <a href="qrectf.html#x">x</a>().</p>
<p><b>See also </b><a href="qrectf.html#setLeft">setLeft</a>(), <a href="qrectf.html#topLeft">topLeft</a>(), and <a href="qrectf.html#bottomLeft">bottomLeft</a>().</p>
<!-- @@@left -->
<!-- $$$marginsAdded[overload1]$$$marginsAddedconstQMarginsF& -->
<h3 class="fn" id="marginsAdded"><a name="marginsAdded"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">marginsAdded</span>(const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>margins</i>) const</h3>
<p>Returns a rectangle grown by the <i>margins</i>.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qrectf.html#operator-2b-eq">operator+=</a>(), <a href="qrectf.html#marginsRemoved">marginsRemoved</a>(), and <a href="qrectf.html#operator--eq">operator-=</a>().</p>
<!-- @@@marginsAdded -->
<!-- $$$marginsRemoved[overload1]$$$marginsRemovedconstQMarginsF& -->
<h3 class="fn" id="marginsRemoved"><a name="marginsRemoved"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">marginsRemoved</span>(const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>margins</i>) const</h3>
<p>Removes the <i>margins</i> from the rectangle, shrinking it.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qrectf.html#marginsAdded">marginsAdded</a>(), <a href="qrectf.html#operator-2b-eq">operator+=</a>(), and <a href="qrectf.html#operator--eq">operator-=</a>().</p>
<!-- @@@marginsRemoved -->
<!-- $$$moveBottom[overload1]$$$moveBottomqreal -->
<h3 class="fn" id="moveBottom"><a name="moveBottom"></a><span class="type">void</span> QRectF::<span class="name">moveBottom</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>Moves the rectangle vertically, leaving the rectangle's bottom edge at the given <i>y</i> coordinate. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#bottom">bottom</a>(), <a href="qrectf.html#setBottom">setBottom</a>(), and <a href="qrectf.html#moveTop">moveTop</a>().</p>
<!-- @@@moveBottom -->
<!-- $$$moveBottomLeft[overload1]$$$moveBottomLeftconstQPointF& -->
<h3 class="fn" id="moveBottomLeft"><a name="moveBottomLeft"></a><span class="type">void</span> QRectF::<span class="name">moveBottomLeft</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Moves the rectangle, leaving the bottom-left corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#setBottomLeft">setBottomLeft</a>(), <a href="qrectf.html#moveBottom">moveBottom</a>(), and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<!-- @@@moveBottomLeft -->
<!-- $$$moveBottomRight[overload1]$$$moveBottomRightconstQPointF& -->
<h3 class="fn" id="moveBottomRight"><a name="moveBottomRight"></a><span class="type">void</span> QRectF::<span class="name">moveBottomRight</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Moves the rectangle, leaving the bottom-right corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#setBottomRight">setBottomRight</a>(), <a href="qrectf.html#moveBottom">moveBottom</a>(), and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<!-- @@@moveBottomRight -->
<!-- $$$moveCenter[overload1]$$$moveCenterconstQPointF& -->
<h3 class="fn" id="moveCenter"><a name="moveCenter"></a><span class="type">void</span> QRectF::<span class="name">moveCenter</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Moves the rectangle, leaving the center point at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#center">center</a>().</p>
<!-- @@@moveCenter -->
<!-- $$$moveLeft[overload1]$$$moveLeftqreal -->
<h3 class="fn" id="moveLeft"><a name="moveLeft"></a><span class="type">void</span> QRectF::<span class="name">moveLeft</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>)</h3>
<p>Moves the rectangle horizontally, leaving the rectangle's left edge at the given <i>x</i> coordinate. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#left">left</a>(), <a href="qrectf.html#setLeft">setLeft</a>(), and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<!-- @@@moveLeft -->
<!-- $$$moveRight[overload1]$$$moveRightqreal -->
<h3 class="fn" id="moveRight"><a name="moveRight"></a><span class="type">void</span> QRectF::<span class="name">moveRight</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>)</h3>
<p>Moves the rectangle horizontally, leaving the rectangle's right edge at the given <i>x</i> coordinate. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#right">right</a>(), <a href="qrectf.html#setRight">setRight</a>(), and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<!-- @@@moveRight -->
<!-- $$$moveTo[overload1]$$$moveToqrealqreal -->
<h3 class="fn" id="moveTo"><a name="moveTo"></a><span class="type">void</span> QRectF::<span class="name">moveTo</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>Moves the rectangle, leaving the top-left corner at the given position (<i>x</i>, <i>y</i>). The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#translate">translate</a>() and <a href="qrectf.html#moveTopLeft">moveTopLeft</a>().</p>
<!-- @@@moveTo -->
<!-- $$$moveTo$$$moveToconstQPointF& -->
<h3 class="fn" id="moveTo-1"><a name="moveTo-1"></a><span class="type">void</span> QRectF::<span class="name">moveTo</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>This is an overloaded function.</p>
<p>Moves the rectangle, leaving the top-left corner at the given <i>position</i>.</p>
<!-- @@@moveTo -->
<!-- $$$moveTop[overload1]$$$moveTopqreal -->
<h3 class="fn" id="moveTop"><a name="moveTop"></a><span class="type">void</span> QRectF::<span class="name">moveTop</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>Moves the rectangle vertically, leaving the rectangle's top line at the given <i>y</i> coordinate. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#top">top</a>(), <a href="qrectf.html#setTop">setTop</a>(), and <a href="qrectf.html#moveBottom">moveBottom</a>().</p>
<!-- @@@moveTop -->
<!-- $$$moveTopLeft[overload1]$$$moveTopLeftconstQPointF& -->
<h3 class="fn" id="moveTopLeft"><a name="moveTopLeft"></a><span class="type">void</span> QRectF::<span class="name">moveTopLeft</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Moves the rectangle, leaving the top-left corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#setTopLeft">setTopLeft</a>(), <a href="qrectf.html#moveTop">moveTop</a>(), and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<!-- @@@moveTopLeft -->
<!-- $$$moveTopRight[overload1]$$$moveTopRightconstQPointF& -->
<h3 class="fn" id="moveTopRight"><a name="moveTopRight"></a><span class="type">void</span> QRectF::<span class="name">moveTopRight</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Moves the rectangle, leaving the top-right corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p><b>See also </b><a href="qrectf.html#setTopRight">setTopRight</a>(), <a href="qrectf.html#moveTop">moveTop</a>(), and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<!-- @@@moveTopRight -->
<!-- $$$normalized[overload1]$$$normalized -->
<h3 class="fn" id="normalized"><a name="normalized"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">normalized</span>() const</h3>
<p>Returns a normalized rectangle; i.e&#x2e;, a rectangle that has a non-negative width and height.</p>
<p>If <a href="qrectf.html#width">width</a>() &lt; 0 the function swaps the left and right corners, and it swaps the top and bottom corners if <a href="qrectf.html#height">height</a>() &lt; 0.</p>
<p><b>See also </b><a href="qrectf.html#isValid">isValid</a>() and <a href="qrectf.html#isEmpty">isEmpty</a>().</p>
<!-- @@@normalized -->
<!-- $$$right[overload1]$$$right -->
<h3 class="fn" id="right"><a name="right"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">right</span>() const</h3>
<p>Returns the x-coordinate of the rectangle's right edge.</p>
<p><b>See also </b><a href="qrectf.html#setRight">setRight</a>(), <a href="qrectf.html#topRight">topRight</a>(), and <a href="qrectf.html#bottomRight">bottomRight</a>().</p>
<!-- @@@right -->
<!-- $$$setBottom[overload1]$$$setBottomqreal -->
<h3 class="fn" id="setBottom"><a name="setBottom"></a><span class="type">void</span> QRectF::<span class="name">setBottom</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>Sets the bottom edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the top edge of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#bottom">bottom</a>() and <a href="qrectf.html#moveBottom">moveBottom</a>().</p>
<!-- @@@setBottom -->
<!-- $$$setBottomLeft[overload1]$$$setBottomLeftconstQPointF& -->
<h3 class="fn" id="setBottomLeft"><a name="setBottomLeft"></a><span class="type">void</span> QRectF::<span class="name">setBottomLeft</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Set the bottom-left corner of the rectangle to the given <i>position</i>. May change the size, but will never change the top-right corner of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#bottomLeft">bottomLeft</a>() and <a href="qrectf.html#moveBottomLeft">moveBottomLeft</a>().</p>
<!-- @@@setBottomLeft -->
<!-- $$$setBottomRight[overload1]$$$setBottomRightconstQPointF& -->
<h3 class="fn" id="setBottomRight"><a name="setBottomRight"></a><span class="type">void</span> QRectF::<span class="name">setBottomRight</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Set the bottom-right corner of the rectangle to the given <i>position</i>. May change the size, but will never change the top-left corner of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#bottomRight">bottomRight</a>() and <a href="qrectf.html#moveBottomRight">moveBottomRight</a>().</p>
<!-- @@@setBottomRight -->
<!-- $$$setCoords[overload1]$$$setCoordsqrealqrealqrealqreal -->
<h3 class="fn" id="setCoords"><a name="setCoords"></a><span class="type">void</span> QRectF::<span class="name">setCoords</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x2</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y2</i>)</h3>
<p>Sets the coordinates of the rectangle's top-left corner to (<i>x1</i>, <i>y1</i>), and the coordinates of its bottom-right corner to (<i>x2</i>, <i>y2</i>).</p>
<p><b>See also </b><a href="qrectf.html#getCoords">getCoords</a>() and <a href="qrectf.html#setRect">setRect</a>().</p>
<!-- @@@setCoords -->
<!-- $$$setHeight[overload1]$$$setHeightqreal -->
<h3 class="fn" id="setHeight"><a name="setHeight"></a><span class="type">void</span> QRectF::<span class="name">setHeight</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i>)</h3>
<p>Sets the height of the rectangle to the given <i>height</i>. The bottom edge is changed, but not the top one.</p>
<p><b>See also </b><a href="qrectf.html#height">height</a>() and <a href="qrectf.html#setSize">setSize</a>().</p>
<!-- @@@setHeight -->
<!-- $$$setLeft[overload1]$$$setLeftqreal -->
<h3 class="fn" id="setLeft"><a name="setLeft"></a><span class="type">void</span> QRectF::<span class="name">setLeft</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>)</h3>
<p>Sets the left edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the right edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setX">setX</a>().</p>
<p><b>See also </b><a href="qrectf.html#left">left</a>() and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<!-- @@@setLeft -->
<!-- $$$setRect[overload1]$$$setRectqrealqrealqrealqreal -->
<h3 class="fn" id="setRect"><a name="setRect"></a><span class="type">void</span> QRectF::<span class="name">setRect</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i>)</h3>
<p>Sets the coordinates of the rectangle's top-left corner to (<i>x</i>, <i>y</i>), and its size to the given <i>width</i> and <i>height</i>.</p>
<p><b>See also </b><a href="qrectf.html#getRect">getRect</a>() and <a href="qrectf.html#setCoords">setCoords</a>().</p>
<!-- @@@setRect -->
<!-- $$$setRight[overload1]$$$setRightqreal -->
<h3 class="fn" id="setRight"><a name="setRight"></a><span class="type">void</span> QRectF::<span class="name">setRight</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>)</h3>
<p>Sets the right edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the left edge of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#right">right</a>() and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<!-- @@@setRight -->
<!-- $$$setSize[overload1]$$$setSizeconstQSizeF& -->
<h3 class="fn" id="setSize"><a name="setSize"></a><span class="type">void</span> QRectF::<span class="name">setSize</span>(const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp;<i>size</i>)</h3>
<p>Sets the size of the rectangle to the given <i>size</i>. The top-left corner is not moved.</p>
<p><b>See also </b><a href="qrectf.html#size">size</a>(), <a href="qrectf.html#setWidth">setWidth</a>(), and <a href="qrectf.html#setHeight">setHeight</a>().</p>
<!-- @@@setSize -->
<!-- $$$setTop[overload1]$$$setTopqreal -->
<h3 class="fn" id="setTop"><a name="setTop"></a><span class="type">void</span> QRectF::<span class="name">setTop</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>Sets the top edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the bottom edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setY">setY</a>().</p>
<p><b>See also </b><a href="qrectf.html#top">top</a>() and <a href="qrectf.html#moveTop">moveTop</a>().</p>
<!-- @@@setTop -->
<!-- $$$setTopLeft[overload1]$$$setTopLeftconstQPointF& -->
<h3 class="fn" id="setTopLeft"><a name="setTopLeft"></a><span class="type">void</span> QRectF::<span class="name">setTopLeft</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Set the top-left corner of the rectangle to the given <i>position</i>. May change the size, but will never change the bottom-right corner of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#topLeft">topLeft</a>() and <a href="qrectf.html#moveTopLeft">moveTopLeft</a>().</p>
<!-- @@@setTopLeft -->
<!-- $$$setTopRight[overload1]$$$setTopRightconstQPointF& -->
<h3 class="fn" id="setTopRight"><a name="setTopRight"></a><span class="type">void</span> QRectF::<span class="name">setTopRight</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>position</i>)</h3>
<p>Set the top-right corner of the rectangle to the given <i>position</i>. May change the size, but will never change the bottom-left corner of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#topRight">topRight</a>() and <a href="qrectf.html#moveTopRight">moveTopRight</a>().</p>
<!-- @@@setTopRight -->
<!-- $$$setWidth[overload1]$$$setWidthqreal -->
<h3 class="fn" id="setWidth"><a name="setWidth"></a><span class="type">void</span> QRectF::<span class="name">setWidth</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>)</h3>
<p>Sets the width of the rectangle to the given <i>width</i>. The right edge is changed, but not the left one.</p>
<p><b>See also </b><a href="qrectf.html#width">width</a>() and <a href="qrectf.html#setSize">setSize</a>().</p>
<!-- @@@setWidth -->
<!-- $$$setX[overload1]$$$setXqreal -->
<h3 class="fn" id="setX"><a name="setX"></a><span class="type">void</span> QRectF::<span class="name">setX</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>)</h3>
<p>Sets the left edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the right edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setLeft">setLeft</a>().</p>
<p><b>See also </b><a href="qrectf.html#x">x</a>(), <a href="qrectf.html#setY">setY</a>(), and <a href="qrectf.html#setTopLeft">setTopLeft</a>().</p>
<!-- @@@setX -->
<!-- $$$setY[overload1]$$$setYqreal -->
<h3 class="fn" id="setY"><a name="setY"></a><span class="type">void</span> QRectF::<span class="name">setY</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>Sets the top edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the bottom edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setTop">setTop</a>().</p>
<p><b>See also </b><a href="qrectf.html#y">y</a>(), <a href="qrectf.html#setX">setX</a>(), and <a href="qrectf.html#setTopLeft">setTopLeft</a>().</p>
<!-- @@@setY -->
<!-- $$$size[overload1]$$$size -->
<h3 class="fn" id="size"><a name="size"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QRectF::<span class="name">size</span>() const</h3>
<p>Returns the size of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#setSize">setSize</a>(), <a href="qrectf.html#width">width</a>(), and <a href="qrectf.html#height">height</a>().</p>
<!-- @@@size -->
<!-- $$$toAlignedRect[overload1]$$$toAlignedRect -->
<h3 class="fn" id="toAlignedRect"><a name="toAlignedRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QRectF::<span class="name">toAlignedRect</span>() const</h3>
<p>Returns a <a href="qrect.html">QRect</a> based on the values of this rectangle that is the smallest possible integer rectangle that completely contains this rectangle.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qrectf.html#toRect">toRect</a>().</p>
<!-- @@@toAlignedRect -->
<!-- $$$toCGRect[overload1]$$$toCGRect -->
<h3 class="fn" id="toCGRect"><a name="toCGRect"></a><span class="type">CGRect</span> QRectF::<span class="name">toCGRect</span>() const</h3>
<p>Creates a CGRect from a <a href="qrectf.html">QRectF</a>.</p>
<p>This function was introduced in  Qt 5.8.</p>
<p><b>See also </b><a href="qrectf.html#fromCGRect">fromCGRect</a>().</p>
<!-- @@@toCGRect -->
<!-- $$$toRect[overload1]$$$toRect -->
<h3 class="fn" id="toRect"><a name="toRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QRectF::<span class="name">toRect</span>() const</h3>
<p>Returns a <a href="qrect.html">QRect</a> based on the values of this rectangle. Note that the coordinates in the returned rectangle are rounded to the nearest integer.</p>
<p><b>See also </b><a href="qrectf.html#QRectF">QRectF</a>() and <a href="qrectf.html#toAlignedRect">toAlignedRect</a>().</p>
<!-- @@@toRect -->
<!-- $$$top[overload1]$$$top -->
<h3 class="fn" id="top"><a name="top"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">top</span>() const</h3>
<p>Returns the y-coordinate of the rectangle's top edge. Equivalent to <a href="qrectf.html#y">y</a>().</p>
<p><b>See also </b><a href="qrectf.html#setTop">setTop</a>(), <a href="qrectf.html#topLeft">topLeft</a>(), and <a href="qrectf.html#topRight">topRight</a>().</p>
<!-- @@@top -->
<!-- $$$topLeft[overload1]$$$topLeft -->
<h3 class="fn" id="topLeft"><a name="topLeft"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QRectF::<span class="name">topLeft</span>() const</h3>
<p>Returns the position of the rectangle's top-left corner.</p>
<p><b>See also </b><a href="qrectf.html#setTopLeft">setTopLeft</a>(), <a href="qrectf.html#top">top</a>(), and <a href="qrectf.html#left">left</a>().</p>
<!-- @@@topLeft -->
<!-- $$$topRight[overload1]$$$topRight -->
<h3 class="fn" id="topRight"><a name="topRight"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QRectF::<span class="name">topRight</span>() const</h3>
<p>Returns the position of the rectangle's top-right corner.</p>
<p><b>See also </b><a href="qrectf.html#setTopRight">setTopRight</a>(), <a href="qrectf.html#top">top</a>(), and <a href="qrectf.html#right">right</a>().</p>
<!-- @@@topRight -->
<!-- $$$translate[overload1]$$$translateqrealqreal -->
<h3 class="fn" id="translate"><a name="translate"></a><span class="type">void</span> QRectF::<span class="name">translate</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i>)</h3>
<p>Moves the rectangle <i>dx</i> along the x-axis and <i>dy</i> along the y-axis, relative to the current position. Positive values move the rectangle to the right and downwards.</p>
<p><b>See also </b><a href="qrectf.html#moveTopLeft">moveTopLeft</a>(), <a href="qrectf.html#moveTo">moveTo</a>(), and <a href="qrectf.html#translated">translated</a>().</p>
<!-- @@@translate -->
<!-- $$$translate$$$translateconstQPointF& -->
<h3 class="fn" id="translate-1"><a name="translate-1"></a><span class="type">void</span> QRectF::<span class="name">translate</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>offset</i>)</h3>
<p>This is an overloaded function.</p>
<p>Moves the rectangle <i>offset</i>.<a href="qpointf.html#x">x()</a> along the x axis and <i>offset</i>.<a href="qpointf.html#y">y()</a> along the y axis, relative to the current position.</p>
<!-- @@@translate -->
<!-- $$$translated[overload1]$$$translatedqrealqreal -->
<h3 class="fn" id="translated"><a name="translated"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">translated</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i>) const</h3>
<p>Returns a copy of the rectangle that is translated <i>dx</i> along the x axis and <i>dy</i> along the y axis, relative to the current position. Positive values move the rectangle to the right and down.</p>
<p><b>See also </b><a href="qrectf.html#translate">translate</a>().</p>
<!-- @@@translated -->
<!-- $$$translated$$$translatedconstQPointF& -->
<h3 class="fn" id="translated-1"><a name="translated-1"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">translated</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>offset</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns a copy of the rectangle that is translated <i>offset</i>.<a href="qpointf.html#x">x()</a> along the x axis and <i>offset</i>.<a href="qpointf.html#y">y()</a> along the y axis, relative to the current position.</p>
<!-- @@@translated -->
<!-- $$$transposed[overload1]$$$transposed -->
<h3 class="fn" id="transposed"><a name="transposed"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">transposed</span>() const</h3>
<p>Returns a copy of the rectangle that has its width and height exchanged:</p>
<pre class="cpp">

  <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> r <span class="operator">=</span> {<span class="number">1.5</span><span class="operator">,</span> <span class="number">5.1</span><span class="operator">,</span> <span class="number">4.2</span><span class="operator">,</span> <span class="number">2.4</span>};
  r <span class="operator">=</span> r<span class="operator">.</span>transposed(); <span class="comment">// r == {1.5, 5.1, 2.4, 4.2}</span>

</pre>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qsizef.html#transposed">QSizeF::transposed</a>().</p>
<!-- @@@transposed -->
<!-- $$$united[overload1]$$$unitedconstQRectF& -->
<h3 class="fn" id="united"><a name="united"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">united</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>) const</h3>
<p>Returns the bounding rectangle of this rectangle and the given <i>rectangle</i>.</p>
<p class="centerAlign"><img src="images/qrect-unite.png" alt="" /></p><p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qrectf.html#intersected">intersected</a>().</p>
<!-- @@@united -->
<!-- $$$width[overload1]$$$width -->
<h3 class="fn" id="width"><a name="width"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">width</span>() const</h3>
<p>Returns the width of the rectangle.</p>
<p><b>See also </b><a href="qrectf.html#setWidth">setWidth</a>(), <a href="qrectf.html#height">height</a>(), and <a href="qrectf.html#size">size</a>().</p>
<!-- @@@width -->
<!-- $$$x[overload1]$$$x -->
<h3 class="fn" id="x"><a name="x"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">x</span>() const</h3>
<p>Returns the x-coordinate of the rectangle's left edge. Equivalent to <a href="qrectf.html#left">left</a>().</p>
<p><b>See also </b><a href="qrectf.html#setX">setX</a>(), <a href="qrectf.html#y">y</a>(), and <a href="qrectf.html#topLeft">topLeft</a>().</p>
<!-- @@@x -->
<!-- $$$y[overload1]$$$y -->
<h3 class="fn" id="y"><a name="y"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QRectF::<span class="name">y</span>() const</h3>
<p>Returns the y-coordinate of the rectangle's top edge. Equivalent to <a href="qrectf.html#top">top</a>().</p>
<p><b>See also </b><a href="qrectf.html#setY">setY</a>(), <a href="qrectf.html#x">x</a>(), and <a href="qrectf.html#topLeft">topLeft</a>().</p>
<!-- @@@y -->
<!-- $$$operator&[overload1]$$$operator&constQRectF& -->
<h3 class="fn" id="operator-and"><a name="operator-and"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">operator&amp;</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>) const</h3>
<p>Returns the intersection of this rectangle and the given <i>rectangle</i>. Returns an empty rectangle if there is no intersection.</p>
<p><b>See also </b><a href="qrectf.html#operator-and-eq">operator&amp;=</a>() and <a href="qrectf.html#intersected">intersected</a>().</p>
<!-- @@@operator& -->
<!-- $$$operator&=[overload1]$$$operator&=constQRectF& -->
<h3 class="fn" id="operator-and-eq"><a name="operator-and-eq"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;QRectF::<span class="name">operator&amp;=</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>)</h3>
<p>Intersects this rectangle with the given <i>rectangle</i>.</p>
<p><b>See also </b><a href="qrectf.html#intersected">intersected</a>() and <a href="qrectf.html#operator-7c-eq">operator|=</a>().</p>
<!-- @@@operator&= -->
<!-- $$$operator+=[overload1]$$$operator+=constQMarginsF& -->
<h3 class="fn" id="operator-2b-eq"><a name="operator-2b-eq"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;QRectF::<span class="name">operator+=</span>(const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>margins</i>)</h3>
<p>Adds the <i>margins</i> to the rectangle, growing it.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qrectf.html#marginsAdded">marginsAdded</a>(), <a href="qrectf.html#marginsRemoved">marginsRemoved</a>(), and <a href="qrectf.html#operator--eq">operator-=</a>().</p>
<!-- @@@operator+= -->
<!-- $$$operator-=[overload1]$$$operator-=constQMarginsF& -->
<h3 class="fn" id="operator--eq"><a name="operator--eq"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;QRectF::<span class="name">operator-=</span>(const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>margins</i>)</h3>
<p>Returns a rectangle shrunk by the <i>margins</i>.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qrectf.html#marginsRemoved">marginsRemoved</a>(), <a href="qrectf.html#operator-2b-eq">operator+=</a>(), and <a href="qrectf.html#marginsAdded">marginsAdded</a>().</p>
<!-- @@@operator-= -->
<!-- $$$operator|[overload1]$$$operator|constQRectF& -->
<h3 class="fn" id="operator-7c"><a name="operator-7c"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> QRectF::<span class="name">operator|</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>) const</h3>
<p>Returns the bounding rectangle of this rectangle and the given <i>rectangle</i>.</p>
<p><b>See also </b><a href="qrectf.html#united">united</a>() and <a href="qrectf.html#operator-7c-eq">operator|=</a>().</p>
<!-- @@@operator| -->
<!-- $$$operator|=[overload1]$$$operator|=constQRectF& -->
<h3 class="fn" id="operator-7c-eq"><a name="operator-7c-eq"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;QRectF::<span class="name">operator|=</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>)</h3>
<p>Unites this rectangle with the given <i>rectangle</i>.</p>
<p><b>See also </b><a href="qrectf.html#united">united</a>() and <a href="qrectf.html#operator-7c">operator|</a>().</p>
<!-- @@@operator|= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator!=[overload1]$$$operator!=constQRectF&constQRectF& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> <span class="name">operator!=</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>r1</i>, const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>r2</i>)</h3>
<p>Returns <code>true</code> if the rectangles <i>r1</i> and <i>r2</i> are different, otherwise returns <code>false</code>.</p>
<!-- @@@operator!= -->
<!-- $$$operator+[overload1]$$$operator+constQRectF&constQMarginsF& -->
<h3 class="fn" id="operator-2b"><a name="operator-2b"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> <span class="name">operator+</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>lhs</i>, const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>rhs</i>)</h3>
<p>Returns the <i>lhs</i> rectangle grown by the <i>rhs</i> margins.</p>
<p>This function was introduced in  Qt 5.3.</p>
<!-- @@@operator+ -->
<!-- $$$operator+$$$operator+constQMarginsF&constQRectF& -->
<h3 class="fn" id="operator-2b-1"><a name="operator-2b-1"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> <span class="name">operator+</span>(const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>lhs</i>, const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rhs</i>)</h3>
<p>This is an overloaded function.</p>
<p>Returns the <i>lhs</i> rectangle grown by the <i>rhs</i> margins.</p>
<p>This function was introduced in  Qt 5.3.</p>
<!-- @@@operator+ -->
<!-- $$$operator-[overload1]$$$operator-constQRectF&constQMarginsF& -->
<h3 class="fn" id="operator-"><a name="operator-"></a><span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> <span class="name">operator-</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>lhs</i>, const <span class="type"><a href="qmarginsf.html">QMarginsF</a></span> &amp;<i>rhs</i>)</h3>
<p>Returns the <i>lhs</i> rectangle grown by the <i>rhs</i> margins.</p>
<p>This function was introduced in  Qt 5.3.</p>
<!-- @@@operator- -->
<!-- $$$operator<<[overload1]$$$operator<<QDataStream&constQRectF& -->
<h3 class="fn" id="operator-lt-lt"><a name="operator-lt-lt"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<span class="name">operator&lt;&lt;</span>(<span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<i>stream</i>, const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>)</h3>
<p>Writes the <i>rectangle</i> to the <i>stream</i>, and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator==[overload1]$$$operator==constQRectF&constQRectF& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> <span class="name">operator==</span>(const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>r1</i>, const <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>r2</i>)</h3>
<p>Returns <code>true</code> if the rectangles <i>r1</i> and <i>r2</i> are equal, otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
<!-- $$$operator>>[overload1]$$$operator>>QDataStream&QRectF& -->
<h3 class="fn" id="operator-gt-gt"><a name="operator-gt-gt"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<span class="name">operator&gt;&gt;</span>(<span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<i>stream</i>, <span class="type"><a href="qrectf.html#QRectF">QRectF</a></span> &amp;<i>rectangle</i>)</h3>
<p>Reads a <i>rectangle</i> from the <i>stream</i>, and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator>> -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>