<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之旅 廣告
                # QRect Class Reference ## [[QtCore](index.htm) module] 查閱QRect類定義使用整數精度在平面的矩形。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, int?aleft, int?atop, int?awidth, int?aheight)` * `__init__ (self, QPoint?atopLeft, QPoint?abottomRight)` * `__init__ (self, QPoint?atopLeft, QSize?asize)` * `__init__ (self, QRect)` * `adjust (self, int?dx1, int?dy1, int?dx2, int?dy2)` * `QRect adjusted (self, int?xp1, int?yp1, int?xp2, int?yp2)` * `int bottom (self)` * `QPoint bottomLeft (self)` * `QPoint bottomRight (self)` * `QPoint center (self)` * `bool contains (self, QPoint?point, bool?proper?=?False)` * `bool contains (self, QRect?rectangle, bool?proper?=?False)` * `bool contains (self, int?ax, int?ay, bool?aproper)` * `bool contains (self, int?ax, int?ay)` * `(int?xp1, int?yp1, int?xp2, int?yp2) getCoords (self)` * `(int?ax, int?ay, int?aw, int?ah) getRect (self)` * `int height (self)` * `QRect intersect (self, QRect?r)` * `QRect intersected (self, QRect?other)` * `bool intersects (self, QRect?r)` * `bool isEmpty (self)` * `bool isNull (self)` * `bool isValid (self)` * `int left (self)` * `moveBottom (self, int?pos)` * `moveBottomLeft (self, QPoint?p)` * `moveBottomRight (self, QPoint?p)` * `moveCenter (self, QPoint?p)` * `moveLeft (self, int?pos)` * `moveRight (self, int?pos)` * `moveTo (self, int?ax, int?ay)` * `moveTo (self, QPoint?p)` * `moveTop (self, int?pos)` * `moveTopLeft (self, QPoint?p)` * `moveTopRight (self, QPoint?p)` * `QRect normalized (self)` * `int right (self)` * `setBottom (self, int?pos)` * `setBottomLeft (self, QPoint?p)` * `setBottomRight (self, QPoint?p)` * `setCoords (self, int?xp1, int?yp1, int?xp2, int?yp2)` * `setHeight (self, int?h)` * `setLeft (self, int?pos)` * `setRect (self, int?ax, int?ay, int?aw, int?ah)` * `setRight (self, int?pos)` * `setSize (self, QSize?s)` * `setTop (self, int?pos)` * `setTopLeft (self, QPoint?p)` * `setTopRight (self, QPoint?p)` * `setWidth (self, int?w)` * `setX (self, int?ax)` * `setY (self, int?ay)` * `QSize size (self)` * `int top (self)` * `QPoint topLeft (self)` * `QPoint topRight (self)` * `translate (self, int?dx, int?dy)` * `translate (self, QPoint?p)` * `QRect translated (self, int?dx, int?dy)` * `QRect translated (self, QPoint?p)` * `QRect unite (self, QRect?r)` * `QRect united (self, QRect?r)` * `int width (self)` * `int x (self)` * `int y (self)` ### Special Methods * `QRect __and__ (self, QRect?r)` * `int __bool__ (self)` * `int __contains__ (self, QPoint?p)` * `int __contains__ (self, QRect?r)` * `bool __eq__ (self, QRect?r2)` * `QRect __iand__ (self, QRect?r)` * `QRect __ior__ (self, QRect?r)` * `bool __ne__ (self, QRect?r2)` * `QRect __or__ (self, QRect?r)` * `str __repr__ (self)` * * * ## Detailed Description 這個類可以醃制。 查閱QRect類定義使用整數精度在平面的矩形。 一個矩形,通常表示為左上角和尺寸。一個查閱QRect的大小(寬度和高度)總是等于其形成的基礎,其呈現的數學矩形。 阿查閱QRect可以用一組左,上,寬度和高度的整數,或者從一個被構造[QPoint](qpoint.html)和[QSize](qsize.html)。下面的代碼創建兩個相同的矩形。 ``` QRect r1(100, 200, 11, 16); QRect r2([QPoint](qpoint.html)(100, 200), [QSize](qsize.html)(11, 16)); ``` 還有就是使用左上角和右下角坐標創建一個查閱QRect第三個構造函數,但是我們建議您避免使用它。理由是,由于歷史原因,返回的值[bottom](qrect.html#bottom)()和[right](qrect.html#right)()函數偏離矩形的真實右下角。 查閱QRect類提供了返回的各種矩形坐標函數的集合,使操縱這些。查閱QRect也提供功能,以矩形相對移動到不同的坐標。此外,還有一個[moveTo](qrect.html#moveTo)( )函數,移動矩形,留下它的左上角在給定的坐標。或者,所述[translate](qrect.html#translate)()函數使矩形給定的偏移量相對于當前位置,并且[translated](qrect.html#translated)( )函數返回這個矩形的翻譯件。 該[size](qrect.html#size)( )函數返回rectange的尺寸為[QSize](qsize.html)。的尺寸也可以單獨使用檢索到的[width](qrect.html#width)()和[height](qrect.html#height)()函數。操控方面使用[setSize](qrect.html#setSize)( )[setWidth](qrect.html#setWidth)()或[setHeight](qrect.html#setHeight)()函數。可替換地,大小可以通過應用或功能設定矩形的坐標,例如被改變,[setBottom](qrect.html#setBottom)()或[setRight](qrect.html#setRight)( ) 。 該[contains](qrect.html#contains)( )函數告訴一個給定的點是否是里面的矩形或沒有了,[intersects](qrect.html#intersects)如果這個矩形相交與給定的矩形( )函數返回True。查閱QRect類還提供了[intersected](qrect.html#intersected)()函數返回相交的矩形,并在[united](qrect.html#united)( )函數將返回一個封裝給定的矩形,這個矩形: | ![](https://img.kancloud.cn/e0/a0/e0a03a0e18572320a0097d9c7000ed3c_432x249.png) | ![](https://img.kancloud.cn/29/ba/29bacfa860c80646716736b9ac9155ef_353x227.png) | | [intersected](qrect.html#intersected)() | [united](qrect.html#united)() | 該[isEmpty](qrect.html#isEmpty)( )函數返回True,如果[left](qrect.html#left)( ) \u003e[right](qrect.html#right)()或[top](qrect.html#top)( ) \u003e[bottom](qrect.html#bottom)( ) 。需要注意的是一個空矩形是無效的:在[isValid](qrect.html#isValid)( )函數返回True,如果[left](qrect.html#left)( )\u003c=[right](qrect.html#right)( )_and_ [top](qrect.html#top)( )\u003c=[bottom](qrect.html#bottom)( ) 。一個空矩形([isNull](qrect.html#isNull)()== TRUE) ,另一方面,也將寬度和高度設置為0。 注意,由于該方式查閱QRect和[QRectF](qrectf.html)被定義,一個空的查閱QRect在本質上以同樣的方式定義為[QRectF](qrectf.html)。 最后,相比查閱QRect對象可以被串流播放,以及。 ### Rendering 當使用一個[anti-aliased](qpainter.html#RenderHint-enum)畫家,查閱QRect的邊界線將對稱地在數學矩形的邊界線的兩側呈現。但使用一個別名畫家(默認值)時,其他規則。 然后,用一個像素寬的畫筆渲染時查閱QRect的邊界線將呈現給正確的和數學矩形的邊界線下方。 當與兩個像素寬畫筆繪制邊界線會由數學矩形被分割在中間。這將是這種情況時的筆被設置成偶數個像素,而與像素數為奇數的筆繪制,備用像素將呈現向右和數學矩形中的一個像素的情況下。 | ![](https://img.kancloud.cn/e6/12/e612d9715e7aa5f6b8f474807087cc4e_333x249.png) | ![](https://img.kancloud.cn/61/51/615130e0b9e5e4db489e897c5bd41572_333x249.png) | | Logical representation | One pixel wide pen | | ![](https://img.kancloud.cn/a4/8b/a48befbe81cd856cbbfe0188b0832de0_333x249.png) | ![](https://img.kancloud.cn/e4/23/e4239fb45c9cd7d055efa6ce8b1912d4_333x249.png) | | Two pixel wide pen | Three pixel wide pen | ### Coordinates 查閱QRect類提供了返回的各種矩形坐標函數的集合,使操縱這些。查閱QRect也提供功能,以矩形相對移動到不同的坐標。 例如在[left](qrect.html#left)( )[setLeft](qrect.html#setLeft)()和[moveLeft](qrect.html#moveLeft)()函數,例如:[left](qrect.html#left)()返回矩形的左邊緣的x坐標,[setLeft](qrect.html#setLeft)()設置矩形的左邊緣到給定的x坐標(它可能會改變寬度,但決不會改變矩形的右邊緣)和[moveLeft](qrect.html#moveLeft)( )移動整個矩形水平,使矩形的左邊緣在給定的x坐標和尺寸不變。 ![](https://img.kancloud.cn/78/2f/782f2a9f22a957b3ca3f207d83e59210_486x294.png) 請注意,返回的值的歷史原因[bottom](qrect.html#bottom)()和[right](qrect.html#right)()函數偏離矩形的真實右下角:該[right](qrect.html#right)( )函數返回_[left](qrect.html#left)() + [width](qrect.html#width)() - 1_和[bottom](qrect.html#bottom)( )函數返回_[top](qrect.html#top)() + [height](qrect.html#height)() - 1_。同樣是由返回的點的情況[bottomRight](qrect.html#bottomRight)( )的便利功能。另外, x和y的坐標[topRight](qrect.html#topRight)()和[bottomLeft](qrect.html#bottomLeft)()函數,分別包含來自真右邊緣和下邊緣的偏差相同。 我們建議您使用[x](qrect.html#x)()+[width](qrect.html#width)()和[y](qrect.html#y)()+[height](qrect.html#height)( )找到真正的右下角,并避免[right](qrect.html#right)()和[bottom](qrect.html#bottom)( ) 。另一個解決方案是使用[QRectF](qrectf.html):該[QRectF](qrectf.html)類定義使用浮點精度的坐標平面中的矩形,而[QRectF.right](qrectf.html#right)()和[QRectF.bottom](qrectf.html#bottom)( )函數_do_返回右邊和底部坐標。 另外,也可以使用偏移量添加到該矩形的坐標[adjust](qrect.html#adjust)()函數,以及檢索使用基于原來的1調整一個新的矩形的[adjusted](qrect.html#adjusted)()函數。如果其中的寬度和高度為負時,用[normalized](qrect.html#normalized)()函數來檢索其中的角部被交換的矩形。 此外,查閱QRect提供[getCoords](qrect.html#getCoords)()函數,其提取的矩形的左上角和右下角的位置,并且[getRect](qrect.html#getRect)( )函數,它提取矩形的左上角,寬度和高度。使用[setCoords](qrect.html#setCoords)()和[setRect](qrect.html#setRect)( )函數來處理矩形的坐標和尺寸一氣呵成。 * * * ## Method Documentation ``` QRect.__init__ (self) ``` 構造一個空矩形。 **See also** [isNull](qrect.html#isNull)( ) 。 ``` QRect.__init__ (self, int?aleft, int?atop, int?awidth, int?aheight) ``` 構造一個矩形與給定_topLeft_和_bottomRight_角落。 **See also** [setTopLeft](qrect.html#setTopLeft)()和[setBottomRight](qrect.html#setBottomRight)( ) 。 ``` QRect.__init__ (self, QPoint?atopLeft, QPoint?abottomRight) ``` 構造一個矩形與給定_topLeft_角部和所述定_size_。 **See also** [setTopLeft](qrect.html#setTopLeft)()和[setSize](qrect.html#setSize)( ) 。 ``` QRect.__init__ (self, QPoint?atopLeft, QSize?asize) ``` 構造一個矩形(_x_,_y_)作為它的左上角和給定的_width_和_height_。 **See also** [setRect](qrect.html#setRect)( ) 。 ``` QRect.__init__ (self, QRect) ``` ``` QRect.adjust (self, int?dx1, int?dy1, int?dx2, int?dy2) ``` 添加_dx1_,_dy1_,_dx2_和_dy2_分別以矩形的現有的坐標。 **See also** [adjusted](qrect.html#adjusted)()和[setRect](qrect.html#setRect)( ) 。 ``` QRect QRect.adjusted (self, int?xp1, int?yp1, int?xp2, int?yp2) ``` [ 返回一個新的矩形_dx1_,_dy1_,_dx2_和_dy2_分別加入到這個矩形的現有坐標。 ](qrect.html) [**See also**](qrect.html) [adjust](qrect.html#adjust)( ) 。 ``` int QRect.bottom (self) ``` 返回矩形的底邊的y坐標。 請注意,由于歷史原因,該函數返回[top](qrect.html#top)()+[height](qrect.html#height)( ) - 1 ;使用[y](qrect.html#y)()+[height](qrect.html#height)()來獲取真正的y坐標。 **See also** [setBottom](qrect.html#setBottom)( )[bottomLeft](qrect.html#bottomLeft)()和[bottomRight](qrect.html#bottomRight)( ) 。 ``` QPoint QRect.bottomLeft (self) ``` [](qpoint.html) [返回矩形的左下角的位置。請注意,由于歷史原因,該函數返回](qpoint.html)[QPoint](qpoint.html)([left](qrect.html#left)( )[top](qrect.html#top)()+[height](qrect.html#height)( ) - 1 ) 。 **See also** [setBottomLeft](qrect.html#setBottomLeft)( )[bottom](qrect.html#bottom)()和[left](qrect.html#left)( ) 。 ``` QPoint QRect.bottomRight (self) ``` [ 返回矩形的右下角的位置。 ](qpoint.html) [請注意,由于歷史原因,該函數返回](qpoint.html)[QPoint](qpoint.html)([left](qrect.html#left)()+[width](qrect.html#width)()-1 ,[top](qrect.html#top)()+[height](qrect.html#height)( ) - 1 ) 。 **See also** [setBottomRight](qrect.html#setBottomRight)( )[bottom](qrect.html#bottom)()和[right](qrect.html#right)( ) 。 ``` QPoint QRect.center (self) ``` [ 返回矩形的中心點。 ](qpoint.html) [**See also**](qpoint.html) [moveCenter](qrect.html#moveCenter)( ) 。 ``` bool QRect.contains (self, QPoint?point, bool?proper?=?False) ``` 返回True如果給定的_point_是內部或矩形的邊緣,否則返回False 。如果_proper_誠然,這個功能只有在給定返回True_point_ is _inside_的矩形(即,不上的邊緣)。 **See also** [intersects](qrect.html#intersects)( ) 。 ``` bool QRect.contains (self, QRect?rectangle, bool?proper?=?False) ``` 這是一個重載函數。 返回True如果點(_x_,_y_)是內部或矩形的邊緣,否則返回False 。如果_proper_誠然,這個功能只有在點是完全的矩形(而不是在邊緣)內返回True 。 ``` bool QRect.contains (self, int?ax, int?ay, bool?aproper) ``` 這是一個重載函數。 返回True如果點(_x_,_y_)是這個矩形內,否則返回False 。 ``` bool QRect.contains (self, int?ax, int?ay) ``` 這是一個重載函數。 返回True如果給定的_rectangle_這是矩形內。否則返回False 。如果_proper_誠然,這個函數只返回True,如果_rectangle_完全是這個矩形(而不是在邊緣)內。 ``` (int?xp1, int?yp1, int?xp2, int?yp2) QRect.getCoords (self) ``` 提取矩形的左上角的位置*_x1_和*_y1_和右下角為*的位置_x2_和*_y2_。 **See also** [setCoords](qrect.html#setCoords)()和[getRect](qrect.html#getRect)( ) 。 ``` (int?ax, int?ay, int?aw, int?ah) QRect.getRect (self) ``` 提取矩形的左上角的位置*_x_和*_y_,其尺寸*_width_和*_height_。 **See also** [setRect](qrect.html#setRect)()和[getCoords](qrect.html#getCoords)( ) 。 ``` int QRect.height (self) ``` 返回該矩形的高度。 **See also** [setHeight](qrect.html#setHeight)( )[width](qrect.html#width)()和[size](qrect.html#size)( ) 。 ``` QRect QRect.intersect (self, QRect?r) ``` [](qrect.html) ``` QRect QRect.intersected (self, QRect?other) ``` [ 返回此矩形的交集和給定的_rectangle_。需要注意的是`r.intersected(s)`相當于`r & s`。 ![](https://img.kancloud.cn/e0/a0/e0a03a0e18572320a0097d9c7000ed3c_432x249.png) 這個函數中引入了Qt 4.2中。 ](qrect.html) [**See also**](qrect.html) [intersects](qrect.html#intersects)( )[united](qrect.html#united)()和[operator&=](qrect.html#operator-and-eq)( ) 。 ``` bool QRect.intersects (self, QRect?r) ``` 如果這個矩形相交與給定的,則返回True_rectangle_(即,至少有一個像素是兩個矩形內),否則返回假。 相交的矩形可使用檢索到的[intersected](qrect.html#intersected)()函數。 **See also** [contains](qrect.html#contains)( ) 。 ``` bool QRect.isEmpty (self) ``` 返回True如果矩形為空,否則返回False 。 一個空矩形有一個[left](qrect.html#left)( ) \u003e[right](qrect.html#right)()或[top](qrect.html#top)( ) \u003e[bottom](qrect.html#bottom)( ) 。一個空矩形是無效的(即,參考isEmpty ( ) == ![isValid](qrect.html#isValid)())。 使用[normalized](qrect.html#normalized)()函數來檢索其中的角部被交換的矩形。 **See also** [isNull](qrect.html#isNull)( )[isValid](qrect.html#isValid)()和[normalized](qrect.html#normalized)( ) 。 ``` bool QRect.isNull (self) ``` 返回True如果矩形為空矩形,否則返回False 。 空矩形具有的寬度和高度設置為0 (即[right](qrect.html#right)()==[left](qrect.html#left)( ) - 1[bottom](qrect.html#bottom)()==[top](qrect.html#top)( ) - 1 ) 。一個空的矩形也是空的,因此是無效的。 **See also** [isEmpty](qrect.html#isEmpty)()和[isValid](qrect.html#isValid)( ) 。 ``` bool QRect.isValid (self) ``` 返回True如果矩形是有效的,否則返回False 。 一個有效的矩形有一個[left](qrect.html#left)()\u003c[right](qrect.html#right)()和[top](qrect.html#top)()\u003c[bottom](qrect.html#bottom)( ) 。請注意,就像十字路口不平凡的操作沒有定義無效矩形。一個有效的矩形不為空(即參考isValid ( ) == ![isEmpty](qrect.html#isEmpty)())。 **See also** [isNull](qrect.html#isNull)( )[isEmpty](qrect.html#isEmpty)()和[normalized](qrect.html#normalized)( ) 。 ``` int QRect.left (self) ``` 返回矩形的左邊緣的x坐標。相當于[x](qrect.html#x)( ) 。 **See also** [setLeft](qrect.html#setLeft)( )[topLeft](qrect.html#topLeft)()和[bottomLeft](qrect.html#bottomLeft)( ) 。 ``` QRect.moveBottom (self, int?pos) ``` 移動矩形垂直,使矩形的底邊在給定的_y_協調。矩形的尺寸是不變的。 **See also** [bottom](qrect.html#bottom)( )[setBottom](qrect.html#setBottom)()和[moveTop](qrect.html#moveTop)( ) 。 ``` QRect.moveBottomLeft (self, QPoint?p) ``` 移動矩形,留下左下角在給定的_position_。矩形的尺寸是不變的。 **See also** [setBottomLeft](qrect.html#setBottomLeft)( )[moveBottom](qrect.html#moveBottom)()和[moveLeft](qrect.html#moveLeft)( ) 。 ``` QRect.moveBottomRight (self, QPoint?p) ``` 移動矩形,留下右下角的定_position_。矩形的尺寸是不變的。 **See also** [setBottomRight](qrect.html#setBottomRight)( )[moveRight](qrect.html#moveRight)()和[moveBottom](qrect.html#moveBottom)( ) 。 ``` QRect.moveCenter (self, QPoint?p) ``` 移動矩形,而使中心點在給定的_position_。矩形的尺寸是不變的。 **See also** [center](qrect.html#center)( ) 。 ``` QRect.moveLeft (self, int?pos) ``` 水平移動矩形,使矩形的左邊緣在給定的_x_協調。矩形的尺寸是不變的。 **See also** [left](qrect.html#left)( )[setLeft](qrect.html#setLeft)()和[moveRight](qrect.html#moveRight)( ) 。 ``` QRect.moveRight (self, int?pos) ``` 水平移動矩形,使矩形的右邊緣在給定的_x_協調。矩形的尺寸是不變的。 **See also** [right](qrect.html#right)( )[setRight](qrect.html#setRight)()和[moveLeft](qrect.html#moveLeft)( ) 。 ``` QRect.moveTo (self, int?ax, int?ay) ``` 移動矩形,留下左上角的指定位置(_x_,_y_) 。矩形的尺寸是不變的。 **See also** [translate](qrect.html#translate)()和[moveTopLeft](qrect.html#moveTopLeft)( ) 。 ``` QRect.moveTo (self, QPoint?p) ``` 移動矩形,留下左上角在給定的_position_。 ``` QRect.moveTop (self, int?pos) ``` 移動矩形垂直,使矩形的頂邊在給定的_y_協調。矩形的尺寸是不變的。 **See also** [top](qrect.html#top)( )[setTop](qrect.html#setTop)()和[moveBottom](qrect.html#moveBottom)( ) 。 ``` QRect.moveTopLeft (self, QPoint?p) ``` 移動矩形,留下左上角在給定的_position_。矩形的尺寸是不變的。 **See also** [setTopLeft](qrect.html#setTopLeft)( )[moveTop](qrect.html#moveTop)()和[moveLeft](qrect.html#moveLeft)( ) 。 ``` QRect.moveTopRight (self, QPoint?p) ``` 移動矩形,留下右上角的定_position_。矩形的尺寸是不變的。 **See also** [setTopRight](qrect.html#setTopRight)( )[moveTop](qrect.html#moveTop)()和[moveRight](qrect.html#moveRight)( ) 。 ``` QRect QRect.normalized (self) ``` [ 返回一個歸一化的矩形,即,具有一個非負的寬度和高度的矩形。 ](qrect.html) [If](qrect.html) [width](qrect.html#width)()\u003c 0的函數交換的左右角部,并且交換的頂部和底部邊角,如果[height](qrect.html#height)()\u003c 0 。 **See also** [isValid](qrect.html#isValid)()和[isEmpty](qrect.html#isEmpty)( ) 。 ``` int QRect.right (self) ``` 返回矩形的右邊緣的x坐標。 請注意,由于歷史原因,該函數返回[left](qrect.html#left)()+[width](qrect.html#width)( ) - 1 ;使用[x](qrect.html#x)()+[width](qrect.html#width)()來獲取真正的x坐標。 **See also** [setRight](qrect.html#setRight)( )[topRight](qrect.html#topRight)()和[bottomRight](qrect.html#bottomRight)( ) 。 ``` QRect.setBottom (self, int?pos) ``` 設置的矩形的底部邊緣與給定的_y_協調。可能會改變高度,但決不會改變矩形的上邊緣。 **See also** [bottom](qrect.html#bottom)()和[moveBottom](qrect.html#moveBottom)( ) 。 ``` QRect.setBottomLeft (self, QPoint?p) ``` 設置矩形的左下角給定的_position_。可以改變大小,但決不會改變矩形的右上角。 **See also** [bottomLeft](qrect.html#bottomLeft)()和[moveBottomLeft](qrect.html#moveBottomLeft)( ) 。 ``` QRect.setBottomRight (self, QPoint?p) ``` 設置矩形的右下角為給定的_position_。可以改變大小,但決不會改變矩形的左上角。 **See also** [bottomRight](qrect.html#bottomRight)()和[moveBottomRight](qrect.html#moveBottomRight)( ) 。 ``` QRect.setCoords (self, int?xp1, int?yp1, int?xp2, int?yp2) ``` 設置矩形的左上角的坐標為(_x1_,_y1_)和其右下角的坐標(_x2_,_y2_) 。 **See also** [coords](index.htm#coords)( )[getCoords](qrect.html#getCoords)()和[setRect](qrect.html#setRect)( ) 。 ``` QRect.setHeight (self, int?h) ``` 設置了矩形的高度為給定的_height_。底部邊緣被改變,但不頂一個。 **See also** [height](qrect.html#height)()和[setSize](qrect.html#setSize)( ) 。 ``` QRect.setLeft (self, int?pos) ``` 設置了矩形的左邊緣到給定的_x_協調。可能會改變寬度,但決不會改變矩形的右邊緣。 相當于[setX](qrect.html#setX)( ) 。 **See also** [left](qrect.html#left)()和[moveLeft](qrect.html#moveLeft)( ) 。 ``` QRect.setRect (self, int?ax, int?ay, int?aw, int?ah) ``` 設置矩形的左上角的坐標為(_x_,_y_) ,并且其大小為給定的_width_和_height_。 **See also** [rect](index.htm#rect)( )[getRect](qrect.html#getRect)()和[setCoords](qrect.html#setCoords)( ) 。 ``` QRect.setRight (self, int?pos) ``` 設置了矩形的右邊緣到給定的_x_協調。可能會改變寬度,但決不會改變矩形的左邊緣。 **See also** [right](qrect.html#right)()和[moveRight](qrect.html#moveRight)( ) 。 ``` QRect.setSize (self, QSize?s) ``` 設置了矩形的大小給定的_size_。在左上角不移動。 **See also** [size](qrect.html#size)( )[setWidth](qrect.html#setWidth)()和[setHeight](qrect.html#setHeight)( ) 。 ``` QRect.setTop (self, int?pos) ``` 設置了矩形的頂邊到給定的_y_協調。可能會改變高度,但決不會改變矩形的底邊。 相當于[setY](qrect.html#setY)( ) 。 **See also** [top](qrect.html#top)()和[moveTop](qrect.html#moveTop)(). ``` QRect.setTopLeft (self, QPoint?p) ``` 設置的矩形的左上角的給定_position_。可以改變大小,但決不會改變矩形的右下角。 **See also** [topLeft](qrect.html#topLeft)()和[moveTopLeft](qrect.html#moveTopLeft)( ) 。 ``` QRect.setTopRight (self, QPoint?p) ``` 設置矩形的右上角,以給定的_position_。可以改變大小,但決不會改變矩形的左下角。 **See also** [topRight](qrect.html#topRight)()和[moveTopRight](qrect.html#moveTopRight)( ) 。 ``` QRect.setWidth (self, int?w) ``` 設置了矩形的寬度與給定_width_。右邊緣被改變,但不是左1 。 **See also** [width](qrect.html#width)()和[setSize](qrect.html#setSize)( ) 。 ``` QRect.setX (self, int?ax) ``` 設置了矩形的左邊緣到給定的_x_協調。可能會改變寬度,但決不會改變矩形的右邊緣。 相當于[setLeft](qrect.html#setLeft)( ) 。 **See also** [x](qrect.html#x)( )[setY](qrect.html#setY)()和[setTopLeft](qrect.html#setTopLeft)( ) 。 ``` QRect.setY (self, int?ay) ``` 設置了矩形的頂邊到給定的_y_協調。可能會改變高度,但決不會改變矩形的底邊。 相當于[setTop](qrect.html#setTop)( ) 。 **See also** [y](qrect.html#y)( )[setX](qrect.html#setX)()和[setTopLeft](qrect.html#setTopLeft)( ) 。 ``` QSize QRect.size (self) ``` [ 返回矩形的大小。 ](qsize.html) [**See also**](qsize.html) [setSize](qrect.html#setSize)( )[width](qrect.html#width)()和[height](qrect.html#height)( ) 。 ``` int QRect.top (self) ``` 返回矩形的上邊緣的y坐標。相當于[y](qrect.html#y)( ) 。 **See also** [setTop](qrect.html#setTop)( )[topLeft](qrect.html#topLeft)()和[topRight](qrect.html#topRight)( ) 。 ``` QPoint QRect.topLeft (self) ``` [ 返回矩形的左上角的位置。 ](qpoint.html) [**See also**](qpoint.html) [setTopLeft](qrect.html#setTopLeft)( )[top](qrect.html#top)()和[left](qrect.html#left)( ) 。 ``` QPoint QRect.topRight (self) ``` [ 返回矩形的右上角的位置。 ](qpoint.html) [請注意,由于歷史原因,該函數返回](qpoint.html)[QPoint](qpoint.html)([left](qrect.html#left)()+[width](qrect.html#width)()-1 ,[top](qrect.html#top)())。 **See also** [setTopRight](qrect.html#setTopRight)( )[top](qrect.html#top)()和[right](qrect.html#right)( ) 。 ``` QRect.translate (self, int?dx, int?dy) ``` 移動矩形_dx_沿x軸和_dy_沿著y軸,相對于當前位置。正值移動矩形向右和向下。 **See also** [moveTopLeft](qrect.html#moveTopLeft)( )[moveTo](qrect.html#moveTo)()和[translated](qrect.html#translated)( ) 。 ``` QRect.translate (self, QPoint?p) ``` 這是一個重載函數。 移動矩形_offset_。[x()](qpoint.html#x)沿x軸和_offset_。[y()](qpoint.html#y)沿著y軸,相對于當前位置。 ``` QRect QRect.translated (self, int?dx, int?dy) ``` [ 返回矩形的副本被翻譯_dx_沿x軸和_dy_沿著y軸,相對于當前位置。正值移動矩形向右和向下。 ](qrect.html) [**See also**](qrect.html) [translate](qrect.html#translate)( ) 。 ``` QRect QRect.translated (self, QPoint?p) ``` [ 這是一個重載函數。 ](qrect.html) [返回矩形的副本被翻譯_offset_。](qrect.html)[x()](qpoint.html#x)沿x軸和_offset_。[y()](qpoint.html#y)沿著y軸,相對于當前位置。 ``` QRect QRect.unite (self, QRect?r) ``` [](qrect.html) ``` QRect QRect.united (self, QRect?r) ``` [ 返回此矩形的邊框和給定_rectangle_。 ![](https://img.kancloud.cn/29/ba/29bacfa860c80646716736b9ac9155ef_353x227.png) 這個函數中引入了Qt 4.2中。 ](qrect.html) [**See also**](qrect.html) [intersected](qrect.html#intersected)( ) 。 ``` int QRect.width (self) ``` 返回矩形的寬度。 **See also** [setWidth](qrect.html#setWidth)( )[height](qrect.html#height)()和[size](qrect.html#size)( ) 。 ``` int QRect.x (self) ``` 返回矩形的左邊緣的x坐標。相當于[left](qrect.html#left)( ) 。 **See also** [setX](qrect.html#setX)( )[y](qrect.html#y)()和[topLeft](qrect.html#topLeft)( ) 。 ``` int QRect.y (self) ``` 返回矩形的上邊緣的y坐標。相當于[top](qrect.html#top)( ) 。 **See also** [setY](qrect.html#setY)( )[x](qrect.html#x)()和[topLeft](qrect.html#topLeft)( ) 。 ``` QRect QRect.__and__ (self, QRect?r) ``` [ ``` int QRect.__bool__ (self) ``` ``` int QRect.__contains__ (self, QPoint?p) ``` ``` int QRect.__contains__ (self, QRect?r) ``` ``` bool QRect.__eq__ (self, QRect?r2) ``` ](qrect.html) ``` QRect QRect.__iand__ (self, QRect?r) ``` [](qrect.html) ``` QRect QRect.__ior__ (self, QRect?r) ``` [ ``` bool QRect.__ne__ (self, QRect?r2) ``` ](qrect.html) ``` QRect QRect.__or__ (self, QRect?r) ``` [ ``` str QRect.__repr__ (self) ``` ](qrect.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>

                              哎呀哎呀视频在线观看