<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QRectF Class Reference ## [[QtCore](index.htm) module] 該QRectF類定義使用浮點精度在平面的矩形。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, QPointF?atopLeft, QSizeF?asize)` * `__init__ (self, QPointF?atopLeft, QPointF?abottomRight)` * `__init__ (self, float?aleft, float?atop, float?awidth, float?aheight)` * `__init__ (self, QRect?r)` * `__init__ (self, QRectF)` * `adjust (self, float?xp1, float?yp1, float?xp2, float?yp2)` * `QRectF adjusted (self, float?xp1, float?yp1, float?xp2, float?yp2)` * `float bottom (self)` * `QPointF bottomLeft (self)` * `QPointF bottomRight (self)` * `QPointF center (self)` * `bool contains (self, QPointF?p)` * `bool contains (self, QRectF?r)` * `bool contains (self, float?ax, float?ay)` * `(float?xp1, float?yp1, float?xp2, float?yp2) getCoords (self)` * `(float?ax, float?ay, float?aaw, float?aah) getRect (self)` * `float height (self)` * `QRectF intersect (self, QRectF?r)` * `QRectF intersected (self, QRectF?r)` * `bool intersects (self, QRectF?r)` * `bool isEmpty (self)` * `bool isNull (self)` * `bool isValid (self)` * `float left (self)` * `moveBottom (self, float?pos)` * `moveBottomLeft (self, QPointF?p)` * `moveBottomRight (self, QPointF?p)` * `moveCenter (self, QPointF?p)` * `moveLeft (self, float?pos)` * `moveRight (self, float?pos)` * `moveTo (self, float?ax, float?ay)` * `moveTo (self, QPointF?p)` * `moveTop (self, float?pos)` * `moveTopLeft (self, QPointF?p)` * `moveTopRight (self, QPointF?p)` * `QRectF normalized (self)` * `float right (self)` * `setBottom (self, float?pos)` * `setBottomLeft (self, QPointF?p)` * `setBottomRight (self, QPointF?p)` * `setCoords (self, float?xp1, float?yp1, float?xp2, float?yp2)` * `setHeight (self, float?ah)` * `setLeft (self, float?pos)` * `setRect (self, float?ax, float?ay, float?aaw, float?aah)` * `setRight (self, float?pos)` * `setSize (self, QSizeF?s)` * `setTop (self, float?pos)` * `setTopLeft (self, QPointF?p)` * `setTopRight (self, QPointF?p)` * `setWidth (self, float?aw)` * `setX (self, float?pos)` * `setY (self, float?pos)` * `QSizeF size (self)` * `QRect toAlignedRect (self)` * `float top (self)` * `QPointF topLeft (self)` * `QPointF topRight (self)` * `QRect toRect (self)` * `translate (self, float?dx, float?dy)` * `translate (self, QPointF?p)` * `QRectF translated (self, float?dx, float?dy)` * `QRectF translated (self, QPointF?p)` * `QRectF unite (self, QRectF?r)` * `QRectF united (self, QRectF?r)` * `float width (self)` * `float x (self)` * `float y (self)` ### Special Methods * `QRectF __and__ (self, QRectF?r)` * `int __bool__ (self)` * `int __contains__ (self, QPointF?p)` * `int __contains__ (self, QRectF?r)` * `bool __eq__ (self, QRectF?r2)` * `QRectF __iand__ (self, QRectF?r)` * `QRectF __ior__ (self, QRectF?r)` * `bool __ne__ (self, QRectF?r2)` * `QRectF __or__ (self, QRectF?r)` * `str __repr__ (self)` * * * ## Detailed Description 這個類可以醃制。 該QRectF類定義使用浮點精度在平面的矩形。 一個矩形,通常表示為左上角和尺寸。一個QRectF的大小(寬度和高度)總是等于其形成的基礎,它呈現的數學矩形。 甲QRectF可以用一組左,上,寬度和高度的整數,或者從一個被構造[QPoint](qpoint.html)和[QSize](qsize.html)。下面的代碼創建兩個相同的矩形。 ``` QRectF r1(100, 200, 11, 16); QRectF r2([QPoint](qpoint.html)(100, 200), [QSize](qsize.html)(11, 16)); ``` 還有一個第三個構造函數從創建QRectF[QRect](qrect.html)和一個相應[toRect](qrectf.html#toRect)( )函數返回一個[QRect](qrect.html)在此基礎上矩形的值的對象(注意,在返回的矩形的坐標被四舍五入到最接近的整數。) 該QRectF類提供了返回的各種矩形坐標函數的集合,使操縱這些。 QRectF還提供功能,以矩形相對移動到不同的坐標。此外,還有一個[moveTo](qrectf.html#moveTo)( )函數,移動矩形,留下它的左上角在給定的坐標。或者,所述[translate](qrectf.html#translate)()函數使矩形給定的偏移量相對于當前位置,并且[translated](qrectf.html#translated)( )函數返回這個矩形的翻譯件。 該[size](qrectf.html#size)( )函數返回rectange的尺寸為[QSize](qsize.html)。的尺寸也可以單獨使用檢索到的[width](qrectf.html#width)()和[height](qrectf.html#height)()函數。操控方面使用[setSize](qrectf.html#setSize)( )[setWidth](qrectf.html#setWidth)()或[setHeight](qrectf.html#setHeight)()函數。可替換地,大小可以通過應用或功能設定矩形的坐標,例如被改變,[setBottom](qrectf.html#setBottom)()或[setRight](qrectf.html#setRight)( ) 。 該[contains](qrectf.html#contains)( )函數告訴一個給定的點是否是里面的矩形或沒有了,[intersects](qrectf.html#intersects)如果這個矩形相交與給定的矩形( )函數返回True (否則返回False ) 。該QRectF類還提供了[intersected](qrectf.html#intersected)()函數返回相交的矩形,并在[united](qrectf.html#united)( )函數將返回一個封裝給定的矩形,這個矩形: | ![](https://img.kancloud.cn/e0/a0/e0a03a0e18572320a0097d9c7000ed3c_432x249.png) | ![](https://img.kancloud.cn/29/ba/29bacfa860c80646716736b9ac9155ef_353x227.png) | | [intersected](qrectf.html#intersected)() | [united](qrectf.html#united)() | 該[isEmpty](qrectf.html#isEmpty)如果該矩形的寬度或高度小于或等于,大于0 , ()函數返回真。需要注意的是一個空矩形是無效的:在[isValid](qrectf.html#isValid)如果寬度和高度大于0 ( )函數返回True。一個空矩形([isNull](qrectf.html#isNull)()== TRUE) ,另一方面,也將寬度和高度設置為0。 注意,由于該方法[QRect](qrect.html)和QRectF定義,一個空QRectF在本質上以同樣的方式定義為[QRect](qrect.html)。 最后,相比QRectF對象可以被串流播放,以及。 ### Rendering 當使用一個[anti-aliased](qpainter.html#RenderHint-enum)畫家, QRectF的邊界線將對稱地在數學矩形的邊界線的兩側呈現。但使用一個別名畫家(默認值)時,其他規則。 然后,用一個像素寬的畫筆繪制時QRectF的邊界線將呈現給正確的和數學矩形的邊界線下方。 當與兩個像素寬畫筆繪制邊界線會由數學矩形被分割在中間。這將是這種情況時的筆被設置成偶數個像素,而與像素數為奇數的筆繪制,備用像素將呈現向右和數學矩形中的一個像素的情況下。 | ![](https://img.kancloud.cn/e6/12/e612d9715e7aa5f6b8f474807087cc4e_333x249.png) | ![](https://img.kancloud.cn/6f/35/6f357f1bb2266cefaed5d688375622a0_333x249.png) | | Logical representation | One pixel wide pen | | ![](https://img.kancloud.cn/7c/43/7c4328010c71ede5cbb74b2d5a14227a_333x249.png) | ![](https://img.kancloud.cn/a7/21/a721bf4df51438a662d26c47b27706e5_333x249.png) | | Two pixel wide pen | Three pixel wide pen | ### Coordinates 該QRectF類提供了返回的各種矩形坐標函數的集合,使操縱這些。 QRectF還提供功能,以矩形相對移動到不同的坐標。 例如:[bottom](qrectf.html#bottom)( )[setBottom](qrectf.html#setBottom)()和[moveBottom](qrectf.html#moveBottom)( )函數:[bottom](qrectf.html#bottom)()返回矩形的底邊的y坐標,[setBottom](qrectf.html#setBottom)()設置矩形的底邊給定的y坐標(它可能會改變高度,但決不會改變矩形的頂邊)和[moveBottom](qrectf.html#moveBottom)( )移動整個矩形垂直,使矩形的底邊在給定的y坐標和尺寸不變。 ![](https://img.kancloud.cn/60/70/6070c44f07350221a4b299ac12d7b562_537x294.png) 另外,也可以使用偏移量添加到該矩形的坐標[adjust](qrectf.html#adjust)()函數,以及檢索使用基于原來的1調整一個新的矩形的[adjusted](qrectf.html#adjusted)()函數。如果其中的寬度和高度為負時,用[normalized](qrectf.html#normalized)()函數來檢索其中的角部被交換的矩形。 此外, QRectF提供[getCoords](qrectf.html#getCoords)()函數,其提取的矩形的左上角和右下角的位置,并且[getRect](qrectf.html#getRect)( )函數,它提取矩形的左上角,寬度和高度。使用[setCoords](qrectf.html#setCoords)()和[setRect](qrectf.html#setRect)( )函數來處理矩形的坐標和尺寸一氣呵成。 * * * ## Method Documentation ``` QRectF.__init__ (self) ``` 構造一個空矩形。 **See also** [isNull](qrectf.html#isNull)( ) 。 ``` QRectF.__init__ (self, QPointF?atopLeft, QSizeF?asize) ``` 構造一個矩形與給定_topLeft_角部和所述定_size_。 **See also** [setTopLeft](qrectf.html#setTopLeft)()和[setSize](qrectf.html#setSize)( ) 。 ``` QRectF.__init__ (self, QPointF?atopLeft, QPointF?abottomRight) ``` 構造一個矩形與給定_topLeft_和_bottomRight_角落。 此功能被引入Qt的4.3 。 **See also** [setTopLeft](qrectf.html#setTopLeft)()和[setBottomRight](qrectf.html#setBottomRight)( ) 。 ``` QRectF.__init__ (self, float?aleft, float?atop, float?awidth, float?aheight) ``` 構造一個矩形(_x_,_y_)作為它的左上角和給定的_width_和_height_。 **See also** [setRect](qrectf.html#setRect)( ) 。 ``` QRectF.__init__ (self, QRect?r) ``` 構造一個[QRectF](qrectf.html)從給定的矩形[QRect](qrect.html) _rectangle_。 **See also** [toRect](qrectf.html#toRect)( ) 。 ``` QRectF.__init__ (self, QRectF) ``` ``` QRectF.adjust (self, float?xp1, float?yp1, float?xp2, float?yp2) ``` 添加_dx1_,_dy1_,_dx2_和_dy2_分別以矩形的現有的坐標。 **See also** [adjusted](qrectf.html#adjusted)()和[setRect](qrectf.html#setRect)( ) 。 ``` QRectF QRectF.adjusted (self, float?xp1, float?yp1, float?xp2, float?yp2) ``` [ 返回一個新的矩形_dx1_,_dy1_,_dx2_和_dy2_分別加入到這個矩形的現有坐標。 ](qrectf.html) [**See also**](qrectf.html) [adjust](qrectf.html#adjust)( ) 。 ``` float QRectF.bottom (self) ``` 返回矩形的底邊的y坐標。 **See also** [setBottom](qrectf.html#setBottom)( )[bottomLeft](qrectf.html#bottomLeft)()和[bottomRight](qrectf.html#bottomRight)( ) 。 ``` QPointF QRectF.bottomLeft (self) ``` [ 返回矩形的左下角的位置。 ](qpointf.html) [**See also**](qpointf.html) [setBottomLeft](qrectf.html#setBottomLeft)( )[bottom](qrectf.html#bottom)()和[left](qrectf.html#left)( ) 。 ``` QPointF QRectF.bottomRight (self) ``` [ 返回矩形的右下角的位置。 ](qpointf.html) [**See also**](qpointf.html) [setBottomRight](qrectf.html#setBottomRight)( )[bottom](qrectf.html#bottom)()和[right](qrectf.html#right)( ) 。 ``` QPointF QRectF.center (self) ``` [ 返回矩形的中心點。 ](qpointf.html) [**See also**](qpointf.html) [moveCenter](qrectf.html#moveCenter)( ) 。 ``` bool QRectF.contains (self, QPointF?p) ``` 返回True如果給定的_point_是內部或矩形的邊緣,否則返回False 。 **See also** [intersects](qrectf.html#intersects)( ) 。 ``` bool QRectF.contains (self, QRectF?r) ``` 這是一個重載函數。 返回True如果點(_x_,_y_)是內部或矩形的邊緣,否則返回False 。 ``` bool QRectF.contains (self, float?ax, float?ay) ``` 這是一個重載函數。 返回True如果給定的_rectangle_是這個矩形里面,否則返回False 。 ``` (float?xp1, float?yp1, float?xp2, float?yp2) QRectF.getCoords (self) ``` 提取矩形的左上角的位置*_x1_和*_y1_和右下角為*的位置_x2_和*_y2_。 **See also** [setCoords](qrectf.html#setCoords)()和[getRect](qrectf.html#getRect)( ) 。 ``` (float?ax, float?ay, float?aaw, float?aah) QRectF.getRect (self) ``` 提取矩形的左上角的位置*_x_和*_y_,其尺寸*_width_和*_height_。 **See also** [setRect](qrectf.html#setRect)()和[getCoords](qrectf.html#getCoords)( ) 。 ``` float QRectF.height (self) ``` 返回該矩形的高度。 **See also** [setHeight](qrectf.html#setHeight)( )[width](qrectf.html#width)()和[size](qrectf.html#size)( ) 。 ``` QRectF QRectF.intersect (self, QRectF?r) ``` [](qrectf.html) ``` QRectF QRectF.intersected (self, QRectF?r) ``` [ 返回此矩形的交集和給定的_rectangle_。需要注意的是`r.intersected(s)`相當于`r & s`。 ![](https://img.kancloud.cn/e0/a0/e0a03a0e18572320a0097d9c7000ed3c_432x249.png) 這個函數中引入了Qt 4.2中。 ](qrectf.html) [**See also**](qrectf.html) [intersects](qrectf.html#intersects)( )[united](qrectf.html#united)()和[operator&=](qrectf.html#operator-and-eq)( ) 。 ``` bool QRectF.intersects (self, QRectF?r) ``` 如果這個矩形相交與給定的,則返回True_rectangle_(即它們之間有重疊的非空白區域) ,否則返回False 。 相交的矩形可使用檢索到的[intersected](qrectf.html#intersected)()函數。 **See also** [contains](qrectf.html#contains)( ) 。 ``` bool QRectF.isEmpty (self) ``` 返回True如果矩形為空,否則返回False 。 一個空矩形有[width](qrectf.html#width)()\u003c = 0或[height](qrectf.html#height)()\u003c = 0 。一個空矩形是無效的(即,參考isEmpty ( ) == ![isValid](qrectf.html#isValid)())。 使用[normalized](qrectf.html#normalized)()函數來檢索其中的角部被交換的矩形。 **See also** [isNull](qrectf.html#isNull)( )[isValid](qrectf.html#isValid)()和[normalized](qrectf.html#normalized)( ) 。 ``` bool QRectF.isNull (self) ``` 返回True如果矩形為空矩形,否則返回False 。 空矩形具有的寬度和高度設置為0。一個空的矩形也是空的,因此無效。 **See also** [isEmpty](qrectf.html#isEmpty)()和[isValid](qrectf.html#isValid)( ) 。 ``` bool QRectF.isValid (self) ``` 返回True如果矩形是有效的,否則返回False 。 一個有效的矩形有一個[width](qrectf.html#width)()\u003e 0和[height](qrectf.html#height)()\u003e 0 。請注意,就像十字路口不平凡的操作沒有定義無效矩形。一個有效的矩形不為空(即參考isValid ( ) == ![isEmpty](qrectf.html#isEmpty)())。 **See also** [isNull](qrectf.html#isNull)( )[isEmpty](qrectf.html#isEmpty)()和[normalized](qrectf.html#normalized)( ) 。 ``` float QRectF.left (self) ``` 返回矩形的左邊緣的x坐標。相當于[x](qrectf.html#x)( ) 。 **See also** [setLeft](qrectf.html#setLeft)( )[topLeft](qrectf.html#topLeft)()和[bottomLeft](qrectf.html#bottomLeft)( ) 。 ``` QRectF.moveBottom (self, float?pos) ``` 移動矩形垂直,使矩形的底邊在給定的_y_協調。矩形的尺寸是不變的。 **See also** [bottom](qrectf.html#bottom)( )[setBottom](qrectf.html#setBottom)()和[moveTop](qrectf.html#moveTop)( ) 。 ``` QRectF.moveBottomLeft (self, QPointF?p) ``` 移動矩形,留下左下角在給定的_position_。矩形的尺寸是不變的。 **See also** [setBottomLeft](qrectf.html#setBottomLeft)( )[moveBottom](qrectf.html#moveBottom)()和[moveLeft](qrectf.html#moveLeft)( ) 。 ``` QRectF.moveBottomRight (self, QPointF?p) ``` 移動矩形,留下右下角的定_position_。矩形的尺寸是不變的。 **See also** [setBottomRight](qrectf.html#setBottomRight)( )[moveBottom](qrectf.html#moveBottom)()和[moveRight](qrectf.html#moveRight)( ) 。 ``` QRectF.moveCenter (self, QPointF?p) ``` 移動矩形,而使中心點在給定的_position_。矩形的尺寸是不變的。 **See also** [center](qrectf.html#center)( ) 。 ``` QRectF.moveLeft (self, float?pos) ``` 水平移動矩形,使矩形的左邊緣在給定的_x_協調。矩形的尺寸是不變的。 **See also** [left](qrectf.html#left)( )[setLeft](qrectf.html#setLeft)()和[moveRight](qrectf.html#moveRight)( ) 。 ``` QRectF.moveRight (self, float?pos) ``` 水平移動矩形,使矩形的右邊緣在給定的_x_協調。矩形的尺寸是不變的。 **See also** [right](qrectf.html#right)( )[setRight](qrectf.html#setRight)()和[moveLeft](qrectf.html#moveLeft)( ) 。 ``` QRectF.moveTo (self, float?ax, float?ay) ``` 移動矩形,留下左上角的指定位置(_x_,_y_) 。矩形的尺寸是不變的。 **See also** [translate](qrectf.html#translate)()和[moveTopLeft](qrectf.html#moveTopLeft)( ) 。 ``` QRectF.moveTo (self, QPointF?p) ``` 這是一個重載函數。 移動矩形,留下左上角在給定的_position_。 ``` QRectF.moveTop (self, float?pos) ``` 移動矩形垂直,使矩形的頂線在給定的_y_協調。矩形的尺寸是不變的。 **See also** [top](qrectf.html#top)( )[setTop](qrectf.html#setTop)()和[moveBottom](qrectf.html#moveBottom)( ) 。 ``` QRectF.moveTopLeft (self, QPointF?p) ``` 移動矩形,留下左上角在給定的_position_。矩形的尺寸是不變的。 **See also** [setTopLeft](qrectf.html#setTopLeft)( )[moveTop](qrectf.html#moveTop)()和[moveLeft](qrectf.html#moveLeft)( ) 。 ``` QRectF.moveTopRight (self, QPointF?p) ``` 移動矩形,留下右上角的定_position_。矩形的尺寸是不變的。 **See also** [setTopRight](qrectf.html#setTopRight)( )[moveTop](qrectf.html#moveTop)()和[moveRight](qrectf.html#moveRight)( ) 。 ``` QRectF QRectF.normalized (self) ``` [ 返回一個歸一化的矩形,即,具有一個非負的寬度和高度的矩形。 ](qrectf.html) [If](qrectf.html) [width](qrectf.html#width)()\u003c 0的函數交換的左右角部,并且交換的頂部和底部邊角,如果[height](qrectf.html#height)()\u003c 0 。 **See also** [isValid](qrectf.html#isValid)()和[isEmpty](qrectf.html#isEmpty)( ) 。 ``` float QRectF.right (self) ``` 返回矩形的右邊緣的x坐標。 **See also** [setRight](qrectf.html#setRight)( )[topRight](qrectf.html#topRight)()和[bottomRight](qrectf.html#bottomRight)( ) 。 ``` QRectF.setBottom (self, float?pos) ``` 設置的矩形的底部邊緣與給定的_y_協調。可能會改變高度,但決不會改變矩形的上邊緣。 **See also** [bottom](qrectf.html#bottom)()和[moveBottom](qrectf.html#moveBottom)( ) 。 ``` QRectF.setBottomLeft (self, QPointF?p) ``` 設置矩形的左下角給定的_position_。可以改變大小,但決不會改變矩形的右上角。 **See also** [bottomLeft](qrectf.html#bottomLeft)()和[moveBottomLeft](qrectf.html#moveBottomLeft)( ) 。 ``` QRectF.setBottomRight (self, QPointF?p) ``` 設置矩形的右下角為給定的_position_。可以改變大小,但決不會改變矩形的左上角。 **See also** [bottomRight](qrectf.html#bottomRight)()和[moveBottomRight](qrectf.html#moveBottomRight)( ) 。 ``` QRectF.setCoords (self, float?xp1, float?yp1, float?xp2, float?yp2) ``` 設置矩形的左上角的坐標為(_x1_,_y1_)和其右下角的坐標(_x2_,_y2_) 。 **See also** [getCoords](qrectf.html#getCoords)()和[setRect](qrectf.html#setRect)( ) 。 ``` QRectF.setHeight (self, float?ah) ``` 設置了矩形的高度為給定的_height_。底部邊緣被改變,但不頂一個。 **See also** [height](qrectf.html#height)()和[setSize](qrectf.html#setSize)( ) 。 ``` QRectF.setLeft (self, float?pos) ``` 設置了矩形的左邊緣到給定的_x_協調。可能會改變寬度,但決不會改變矩形的右邊緣。 相當于[setX](qrectf.html#setX)( ) 。 **See also** [left](qrectf.html#left)()和[moveLeft](qrectf.html#moveLeft)( ) 。 ``` QRectF.setRect (self, float?ax, float?ay, float?aaw, float?aah) ``` 設置矩形的左上角的坐標為(_x_,_y_) ,并且其大小為給定的_width_和_height_。 **See also** [getRect](qrectf.html#getRect)()和[setCoords](qrectf.html#setCoords)( ) 。 ``` QRectF.setRight (self, float?pos) ``` 設置了矩形的右邊緣到給定的_x_協調。可能會改變寬度,但決不會改變矩形的左邊緣。 **See also** [right](qrectf.html#right)()和[moveRight](qrectf.html#moveRight)( ) 。 ``` QRectF.setSize (self, QSizeF?s) ``` 設置了矩形的大小給定的_size_。在左上角不移動。 **See also** [size](qrectf.html#size)( )[setWidth](qrectf.html#setWidth)()和[setHeight](qrectf.html#setHeight)( ) 。 ``` QRectF.setTop (self, float?pos) ``` 設置了矩形的頂邊到給定的_y_協調。可能會改變高度,但決不會改變矩形的底邊。 相當于[setY](qrectf.html#setY)( ) 。 **See also** [top](qrectf.html#top)()和[moveTop](qrectf.html#moveTop)( ) 。 ``` QRectF.setTopLeft (self, QPointF?p) ``` 設置的矩形的左上角的給定_position_。可以改變大小,但決不會改變矩形的右下角。 **See also** [topLeft](qrectf.html#topLeft)()和[moveTopLeft](qrectf.html#moveTopLeft)( ) 。 ``` QRectF.setTopRight (self, QPointF?p) ``` 設置矩形的右上角,以給定的_position_。可以改變大小,但決不會改變矩形的左下角。 **See also** [topRight](qrectf.html#topRight)()和[moveTopRight](qrectf.html#moveTopRight)( ) 。 ``` QRectF.setWidth (self, float?aw) ``` 設置了矩形的寬度與給定_width_。右邊緣被改變,但不是左1 。 **See also** [width](qrectf.html#width)()和[setSize](qrectf.html#setSize)( ) 。 ``` QRectF.setX (self, float?pos) ``` 設置了矩形的左邊緣到給定的_x_協調。可能會改變寬度,但決不會改變矩形的右邊緣。 相當于[setLeft](qrectf.html#setLeft)( ) 。 **See also** [x](qrectf.html#x)( )[setY](qrectf.html#setY)()和[setTopLeft](qrectf.html#setTopLeft)( ) 。 ``` QRectF.setY (self, float?pos) ``` 設置了矩形的頂邊到給定的_y_協調。可能會改變高度,但決不會改變矩形的底邊。 相當于[setTop](qrectf.html#setTop)( ) 。 **See also** [y](qrectf.html#y)( )[setX](qrectf.html#setX)()和[setTopLeft](qrectf.html#setTopLeft)( ) 。 ``` QSizeF QRectF.size (self) ``` [ 返回矩形的大小。 ](qsizef.html) [**See also**](qsizef.html) [setSize](qrectf.html#setSize)( )[width](qrectf.html#width)()和[height](qrectf.html#height)( ) 。 ``` QRect QRectF.toAlignedRect (self) ``` [](qrect.html) [返回](qrect.html)[QRect](qrect.html)基于這個矩形是可能的最小整數矩形完全包含此矩形的值。 此功能被引入Qt的4.3 。 **See also** [toRect](qrectf.html#toRect)( ) 。 ``` float QRectF.top (self) ``` 返回矩形的上邊緣的y坐標。相當于[y](qrectf.html#y)( ) 。 **See also** [setTop](qrectf.html#setTop)( )[topLeft](qrectf.html#topLeft)()和[topRight](qrectf.html#topRight)( ) 。 ``` QPointF QRectF.topLeft (self) ``` [ 返回矩形的左上角的位置。 ](qpointf.html) [**See also**](qpointf.html) [setTopLeft](qrectf.html#setTopLeft)( )[top](qrectf.html#top)()和[left](qrectf.html#left)( ) 。 ``` QPointF QRectF.topRight (self) ``` [ 返回矩形的右上角的位置。 ](qpointf.html) [**See also**](qpointf.html) [setTopRight](qrectf.html#setTopRight)( )[top](qrectf.html#top)()和[right](qrectf.html#right)( ) 。 ``` QRect QRectF.toRect (self) ``` [](qrect.html) [返回](qrect.html)[QRect](qrect.html)在此基礎上矩形的值。請注意,在返回的矩形坐標四舍五入到最接近的整數。 **See also** [QRectF](qrectf.html#QRectF)()和[toAlignedRect](qrectf.html#toAlignedRect)( ) 。 ``` QRectF.translate (self, float?dx, float?dy) ``` 移動矩形_dx_沿x軸和_dy_沿著y軸,相對于當前位置。正值移動矩形向右,向下。 **See also** [moveTopLeft](qrectf.html#moveTopLeft)( )[moveTo](qrectf.html#moveTo)()和[translated](qrectf.html#translated)( ) 。 ``` QRectF.translate (self, QPointF?p) ``` 這是一個重載函數。 移動矩形_offset_。[x()](qpointf.html#x)沿x軸和_offset_。[y()](qpointf.html#y)沿著y軸,相對于當前位置。 ``` QRectF QRectF.translated (self, float?dx, float?dy) ``` [ 返回矩形的副本被翻譯_dx_沿x軸和_dy_沿著y軸,相對于當前位置。正值移動矩形向右和向下。 ](qrectf.html) [**See also**](qrectf.html) [translate](qrectf.html#translate)( ) 。 ``` QRectF QRectF.translated (self, QPointF?p) ``` [ 這是一個重載函數。 ](qrectf.html) [返回矩形的副本被翻譯_offset_。](qrectf.html)[x()](qpointf.html#x)沿x軸和_offset_。[y()](qpointf.html#y)沿著y軸,相對于當前位置。 ``` QRectF QRectF.unite (self, QRectF?r) ``` [](qrectf.html) ``` QRectF QRectF.united (self, QRectF?r) ``` [ 返回此矩形的邊框和給定_rectangle_。 ![](https://img.kancloud.cn/29/ba/29bacfa860c80646716736b9ac9155ef_353x227.png) 這個函數中引入了Qt 4.2中。 ](qrectf.html) [**See also**](qrectf.html) [intersected](qrectf.html#intersected)( ) 。 ``` float QRectF.width (self) ``` 返回矩形的寬度。 **See also** [setWidth](qrectf.html#setWidth)( )[height](qrectf.html#height)()和[size](qrectf.html#size)( ) 。 ``` float QRectF.x (self) ``` 返回矩形的左邊緣的x坐標。相當于[left](qrectf.html#left)( ) 。 **See also** [setX](qrectf.html#setX)( )[y](qrectf.html#y)()和[topLeft](qrectf.html#topLeft)( ) 。 ``` float QRectF.y (self) ``` 返回矩形的上邊緣的y坐標。相當于[top](qrectf.html#top)( ) 。 **See also** [setY](qrectf.html#setY)( )[x](qrectf.html#x)()和[topLeft](qrectf.html#topLeft)( ) 。 ``` QRectF QRectF.__and__ (self, QRectF?r) ``` [ ``` int QRectF.__bool__ (self) ``` ``` int QRectF.__contains__ (self, QPointF?p) ``` ``` int QRectF.__contains__ (self, QRectF?r) ``` ``` bool QRectF.__eq__ (self, QRectF?r2) ``` ](qrectf.html) ``` QRectF QRectF.__iand__ (self, QRectF?r) ``` [](qrectf.html) ``` QRectF QRectF.__ior__ (self, QRectF?r) ``` [ ``` bool QRectF.__ne__ (self, QRectF?r2) ``` ](qrectf.html) ``` QRectF QRectF.__or__ (self, QRectF?r) ``` [ ``` str QRectF.__repr__ (self) ``` ](qrectf.html)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看