<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # QTextLine Class Reference ## [[QtGui](index.htm) module] 在QTextLine類表示一個文本行內[QTextLayout](qtextlayout.html)。[More...](#details) ### Types * `enum CursorPosition { CursorBetweenCharacters, CursorOnCharacter }` * `enum Edge { Leading, Trailing }` ### Methods * `__init__ (self)` * `__init__ (self, QTextLine)` * `float ascent (self)` * `(float, int?cursorPos) cursorToX (self, int?cursorPos, Edge?edge?=?QTextLine.Leading)` * `float descent (self)` * `draw (self, QPainter?painter, QPointF?position, QTextLayout.FormatRange?selection?=?None)` * `float height (self)` * `float horizontalAdvance (self)` * `bool isValid (self)` * `float leading (self)` * `bool leadingIncluded (self)` * `int lineNumber (self)` * `QRectF naturalTextRect (self)` * `float naturalTextWidth (self)` * `QPointF position (self)` * `QRectF rect (self)` * `setLeadingIncluded (self, bool?included)` * `setLineWidth (self, float?width)` * `setNumColumns (self, int?columns)` * `setNumColumns (self, int?columns, float?alignmentWidth)` * `setPosition (self, QPointF?pos)` * `int textLength (self)` * `int textStart (self)` * `float width (self)` * `float x (self)` * `int xToCursor (self, float?x, CursorPosition?edge?=?QTextLine.CursorBetweenCharacters)` * `float y (self)` * * * ## Detailed Description 在QTextLine類表示一個文本行內[QTextLayout](qtextlayout.html)。 一個文本行通常是由創建[QTextLayout.createLine](qtextlayout.html#createLine)( ) 。 創建后,該行可使用的填充[setLineWidth](qtextline.html#setLineWidth)()或[setNumColumns](qtextline.html#setNumColumns)()函數。 A線都有一些屬性,包括其佔用的矩形,[rect](qtextline.html#rect)() ,其坐標,[x](qtextline.html#x)()和[y](qtextline.html#y)() ,其[textLength](qtextline.html#textLength)( )[width](qtextline.html#width)()和[naturalTextWidth](qtextline.html#naturalTextWidth)() ,和其[ascent](qtextline.html#ascent)( )和體面()相對于文本。光標在該行的條款的位置是可從[cursorToX](qtextline.html#cursorToX)()和從它的逆[xToCursor](qtextline.html#xToCursor)( ) 。 A線可以與移動[setPosition](qtextline.html#setPosition)( ) 。 * * * ## Type Documentation ``` QTextLine.CursorPosition ``` | Constant | Value | | --- | --- | | `QTextLine.CursorBetweenCharacters` | `0` | | `QTextLine.CursorOnCharacter` | `1` | ``` QTextLine.Edge ``` | Constant | Value | | --- | --- | | `QTextLine.Leading` | `0` | | `QTextLine.Trailing` | `1` | * * * ## Method Documentation ``` QTextLine.__init__ (self) ``` 創建一個無效的行。 ``` QTextLine.__init__ (self, QTextLine) ``` ``` float QTextLine.ascent (self) ``` 返回該行的崛起。 **See also** [descent](qtextline.html#descent)()和[height](qtextline.html#height)( ) 。 ``` (float, int?cursorPos) QTextLine.cursorToX (self, int?cursorPos, Edge?edge?=?QTextLine.Leading) ``` 光標位置轉換_cursorPos_到的對應的行內x位置,同時考慮_edge_。 If _cursorPos_是不是一個有效的光標位置,最接近的有效光標位置將被替代使用,并CPOS將被修改為指向這個有效的光標位置。 **See also** [xToCursor](qtextline.html#xToCursor)( ) 。 ``` float QTextLine.descent (self) ``` 返回該行的后裔。 **See also** [ascent](qtextline.html#ascent)()和[height](qtextline.html#height)( ) 。 ``` QTextLine.draw (self, QPainter?painter, QPointF?position, QTextLayout.FormatRange?selection?=?None) ``` 繪制行中給定的_painter_在指定的_position_。該_selection_供內部使用保留的。 ``` float QTextLine.height (self) ``` 返回該行的高度。這等于[ascent](qtextline.html#ascent)()+[descent](qtextline.html#descent)( ) + 1 ,如果是不包括在內的領先。如果領導包括在內,這等于[ascent](qtextline.html#ascent)()+[descent](qtextline.html#descent)()+[leading](qtextline.html#leading)()+ 1 。 **See also** [ascent](qtextline.html#ascent)( )[descent](qtextline.html#descent)( )[leading](qtextline.html#leading)()和[setLeadingIncluded](qtextline.html#setLeadingIncluded)( ) 。 ``` float QTextLine.horizontalAdvance (self) ``` 返回文本的水平前進。文本的進步是從它的位置到下一個位置,在該文本自然會得出的距離。 通過將前進到文本行的位置,并使用這個作為第二文本行的位置,你就可以無需在兩者之間的間隙來定位兩行并排側。 此功能被引入Qt的4.7 。 ``` bool QTextLine.isValid (self) ``` 返回True如果該文本行是有效的,否則返回False 。 ``` float QTextLine.leading (self) ``` 返回該行的領導。 此功能被引入Qt的4.6 。 **See also** [ascent](qtextline.html#ascent)( )[descent](qtextline.html#descent)()和[height](qtextline.html#height)( ) 。 ``` bool QTextLine.leadingIncluded (self) ``` 返回True如果積極主導,計入該行的高度,否則返回False 。 默認情況下,是不包括在內的領先。 此功能被引入Qt的4.6 。 **See also** [setLeadingIncluded](qtextline.html#setLeadingIncluded)( ) 。 ``` int QTextLine.lineNumber (self) ``` 返回文本引擎的線的位置。 ``` QRectF QTextLine.naturalTextRect (self) ``` [ 返回復蓋的線的矩形。 ``` float QTextLine.naturalTextWidth (self) ``` ](qrectf.html) [返回由文本所佔據的線的寬度。這始終是\u003c =到](qrectf.html)[width](qtextline.html#width)( ) ,并且是可以在不改變換行位置使用的布局( )的最小寬度。 ``` QPointF QTextLine.position (self) ``` [ 返回該行的位置相對于文本布局的地位。 ](qpointf.html) [**See also**](qpointf.html) [setPosition](qtextline.html#setPosition)( ) 。 ``` QRectF QTextLine.rect (self) ``` [ 返回該行的邊界矩形。 ](qrectf.html) [**See also**](qrectf.html) [x](qtextline.html#x)( )[y](qtextline.html#y)( )[textLength](qtextline.html#textLength)()和[width](qtextline.html#width)( ) 。 ``` QTextLine.setLeadingIncluded (self, bool?included) ``` 包括積極主導入行的高度,如果_included_為True,否則不包括領先。 默認情況下,是不包括在內的領先。 需要注意的是負領先被忽略,它必須在代碼中使用的文本行通過讓線重疊處理。 此功能被引入Qt的4.6 。 **See also** [leadingIncluded](qtextline.html#leadingIncluded)( ) 。 ``` QTextLine.setLineWidth (self, float?width) ``` 勾畫出具有給定的線_width_。該生產線是從起始位置充滿了盡可能多的字符將適合入行。在殼體的文本不能被分割在該行的末尾,將被填充有附加字符到下一個空白字符或文本的末尾。 ``` QTextLine.setNumColumns (self, int?columns) ``` 勾畫出的線條。該生產線是從它的起始位置充滿了盡可能多的字符被指定_numColumns_。若文本不能被分割,直到_numColumns_字符,該行就會充滿盡可能多的字符到下一個空格或文字的結尾。 ``` QTextLine.setNumColumns (self, int?columns, float?alignmentWidth) ``` 勾畫出的線條。該生產線是從它的起始位置充滿了盡可能多的字符被指定_numColumns_。若文本不能被分割,直到_numColumns_字符,該行就會充滿盡可能多的字符到下一個空格或文字的結尾。提供_alignmentWidth_被用作基準寬度對齊。 ``` QTextLine.setPosition (self, QPointF?pos) ``` 移動線位置_pos_。 **See also** [position](qtextline.html#position)( ) 。 ``` int QTextLine.textLength (self) ``` 返回該行的文本的長度。 **See also** [naturalTextWidth](qtextline.html#naturalTextWidth)( ) 。 ``` int QTextLine.textStart (self) ``` 返回該行的開始從傳遞到該字符串的開頭[QTextLayout](qtextlayout.html)。 ``` float QTextLine.width (self) ``` 返回所指定的布局( )函數線的寬度。 **See also** [naturalTextWidth](qtextline.html#naturalTextWidth)( )[x](qtextline.html#x)( )[y](qtextline.html#y)( )[textLength](qtextline.html#textLength)()和[rect](qtextline.html#rect)( ) 。 ``` float QTextLine.x (self) ``` 返回該行的x位置。 **See also** [rect](qtextline.html#rect)( )[y](qtextline.html#y)( )[textLength](qtextline.html#textLength)()和[width](qtextline.html#width)( ) 。 ``` int QTextLine.xToCursor (self, float?x, CursorPosition?edge?=?QTextLine.CursorBetweenCharacters) ``` 轉換的x坐標_x_到最近匹配的光標位置,根據光標位置類型,_cpos_。 **See also** [cursorToX](qtextline.html#cursorToX)( ) 。 ``` float QTextLine.y (self) ``` 返回該行的y位置。 **See also** [x](qtextline.html#x)( )[rect](qtextline.html#rect)( )[textLength](qtextline.html#textLength)()和[width](qtextline.html#width)( ) 。
                  <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>

                              哎呀哎呀视频在线观看