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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QPlainTextEdit Class Reference ## [[QtGui](index.htm) module] 該QPlainTextEdit類提供用于編輯和顯示純文本的小工具。[More...](#details) 繼承[QAbstractScrollArea](qabstractscrollarea.html)。 ### Types * `enum LineWrapMode { NoWrap, WidgetWidth }` ### Methods * `__init__ (self, QWidget?parent?=?None)` * `__init__ (self, QString?text, QWidget?parent?=?None)` * `QString anchorAt (self, QPoint?pos)` * `appendHtml (self, QString?html)` * `appendPlainText (self, QString?text)` * `bool backgroundVisible (self)` * `QRectF blockBoundingGeometry (self, QTextBlock?block)` * `QRectF blockBoundingRect (self, QTextBlock?block)` * `int blockCount (self)` * `bool canInsertFromMimeData (self, QMimeData?source)` * `bool canPaste (self)` * `centerCursor (self)` * `bool centerOnScroll (self)` * `changeEvent (self, QEvent?e)` * `clear (self)` * `QPointF contentOffset (self)` * `contextMenuEvent (self, QContextMenuEvent?e)` * `copy (self)` * `QMimeData createMimeDataFromSelection (self)` * `QMenu createStandardContextMenu (self)` * `QTextCharFormat currentCharFormat (self)` * `QTextCursor cursorForPosition (self, QPoint?pos)` * `QRect cursorRect (self, QTextCursor?cursor)` * `QRect cursorRect (self)` * `int cursorWidth (self)` * `cut (self)` * `QTextDocument document (self)` * `QString documentTitle (self)` * `dragEnterEvent (self, QDragEnterEvent?e)` * `dragLeaveEvent (self, QDragLeaveEvent?e)` * `dragMoveEvent (self, QDragMoveEvent?e)` * `dropEvent (self, QDropEvent?e)` * `ensureCursorVisible (self)` * `bool event (self, QEvent?e)` * `list-of-QTextEdit.ExtraSelection extraSelections (self)` * `bool find (self, QString?exp, QTextDocument.FindFlags?options?=?0)` * `QTextBlock firstVisibleBlock (self)` * `focusInEvent (self, QFocusEvent?e)` * `bool focusNextPrevChild (self, bool?next)` * `focusOutEvent (self, QFocusEvent?e)` * `QAbstractTextDocumentLayout.PaintContext getPaintContext (self)` * `inputMethodEvent (self, QInputMethodEvent)` * `QVariant inputMethodQuery (self, Qt.InputMethodQuery?property)` * `insertFromMimeData (self, QMimeData?source)` * `insertPlainText (self, QString?text)` * `bool isReadOnly (self)` * `bool isUndoRedoEnabled (self)` * `keyPressEvent (self, QKeyEvent?e)` * `keyReleaseEvent (self, QKeyEvent?e)` * `LineWrapMode lineWrapMode (self)` * `QVariant loadResource (self, int?type, QUrl?name)` * `int maximumBlockCount (self)` * `mergeCurrentCharFormat (self, QTextCharFormat?modifier)` * `mouseDoubleClickEvent (self, QMouseEvent?e)` * `mouseMoveEvent (self, QMouseEvent?e)` * `mousePressEvent (self, QMouseEvent?e)` * `mouseReleaseEvent (self, QMouseEvent?e)` * `moveCursor (self, QTextCursor.MoveOperation?operation, QTextCursor.MoveMode?mode?=?QTextCursor.MoveAnchor)` * `bool overwriteMode (self)` * `paintEvent (self, QPaintEvent?e)` * `paste (self)` * `print (self, QPrinter?printer)` * `print_ (self, QPrinter?printer)` * `redo (self)` * `resizeEvent (self, QResizeEvent?e)` * `scrollContentsBy (self, int?dx, int?dy)` * `selectAll (self)` * `setBackgroundVisible (self, bool?visible)` * `setCenterOnScroll (self, bool?enabled)` * `setCurrentCharFormat (self, QTextCharFormat?format)` * `setCursorWidth (self, int?width)` * `setDocument (self, QTextDocument?document)` * `setDocumentTitle (self, QString?title)` * `setExtraSelections (self, list-of-QTextEdit.ExtraSelection?selections)` * `setLineWrapMode (self, LineWrapMode?mode)` * `setMaximumBlockCount (self, int?maximum)` * `setOverwriteMode (self, bool?overwrite)` * `setPlainText (self, QString?text)` * `setReadOnly (self, bool?ro)` * `setTabChangesFocus (self, bool?b)` * `setTabStopWidth (self, int?width)` * `setTextCursor (self, QTextCursor?cursor)` * `setTextInteractionFlags (self, Qt.TextInteractionFlags?flags)` * `setUndoRedoEnabled (self, bool?enable)` * `setWordWrapMode (self, QTextOption.WrapMode?policy)` * `showEvent (self, QShowEvent)` * `bool tabChangesFocus (self)` * `int tabStopWidth (self)` * `QTextCursor textCursor (self)` * `Qt.TextInteractionFlags textInteractionFlags (self)` * `timerEvent (self, QTimerEvent?e)` * `QString toPlainText (self)` * `undo (self)` * `wheelEvent (self, QWheelEvent?e)` * `QTextOption.WrapMode wordWrapMode (self)` ### Qt Signals * `void blockCountChanged (int)` * `void copyAvailable (bool)` * `void cursorPositionChanged ()` * `void modificationChanged (bool)` * `void redoAvailable (bool)` * `void selectionChanged ()` * `void textChanged ()` * `void undoAvailable (bool)` * `void updateRequest (const QRect&,int)` * * * ## Detailed Description 該QPlainTextEdit類提供用于編輯和顯示純文本的小工具。 ### Introduction and Concepts QPlainTextEdit是一種先進的瀏覽器/編輯器,支持純文本。這是優化處理大型文件,并快速響應用戶輸入。 QPlainText使用非常相同的技術和概念[QTextEdit](qtextedit.html),但最適用于純文本的處理。 QPlainTextEdit工程對段落和字符。一個段落是一個格式化字符串,它是自動換行以適應窗口部件的寬度。通過閱讀純文本時,默認情況下,有一個換行符表示一個段落。文檔包含零個或多個段落。段落是由硬換行符分隔。一個段內的每個字符具有其自己的屬性,例如,字體和顏色。 鼠標光標的上一個QPlainTextEdit的形狀是[Qt.IBeamCursor](qt.html#CursorShape-enum)在默認情況下。它可以通過改變該[viewport](qabstractscrollarea.html#viewport)( )的游標屬性。 ### Using QPlainTextEdit as a Display Widget 全文載或更換使用[setPlainText](qplaintextedit.html#plainText-prop)(),它會刪除現有的文本和傳遞給文本替換它[setPlainText](qplaintextedit.html#plainText-prop)( ) 。 文本可以使用插入的[QTextCursor](qtextcursor.html)類或者使用的方便功能[insertPlainText](qplaintextedit.html#insertPlainText)( )[appendPlainText](qplaintextedit.html#appendPlainText)()或[paste](qplaintextedit.html#paste)( ) 。 默認情況下,文本編輯換行的空白,以適應文本編輯窗口部件。該[setLineWrapMode](qplaintextedit.html#lineWrapMode-prop)( )函數是用來指定你想要的那種線包裹,[WidgetWidth](qplaintextedit.html#LineWrapMode-enum) or [NoWrap](qplaintextedit.html#LineWrapMode-enum)如果你不希望任何包裝。如果您使用自動換行到Widget的寬度[WidgetWidth](qplaintextedit.html#LineWrapMode-enum),您可以指定是否要與打破空白或任何地方[setWordWrapMode](qplaintextedit.html#wordWrapMode-prop)( ) 。 該[find](qplaintextedit.html#find)( )函數可以用來查找和選擇文本中給定的字符串。 如果你想限制在一個QPlainTextEdit段的總數,因為它是例如在日志查看器有用,那么你可以使用[maximumBlockCount](qplaintextedit.html#maximumBlockCount-prop)屬性。的組合[setMaximumBlockCount](qplaintextedit.html#maximumBlockCount-prop)()和[appendPlainText](qplaintextedit.html#appendPlainText)( )將QPlainTextEdit成一個高效的查看器日志文本。滾動可減少與[centerOnScroll](qplaintextedit.html#centerOnScroll-prop)()屬性,使得日志查看器更快。文字可以以有限的方式進行格式化,或者使用語法高亮顯示(見下文) ,或通過添加HTML格式的文本與[appendHtml](qplaintextedit.html#appendHtml)( ) 。雖然QPlainTextEdit不支持復雜的富文本渲染的表和浮筒,它的確支持,您可能需要在日志查看器有限段落為基礎的格式。 #### Read-only Key Bindings 當QPlainTextEdit用于只讀的鍵綁定僅限于導航和文字可能只用鼠標進行選擇: | Keypresses | Action | | --- | --- | | [Qt.UpArrow](qt.html#ArrowType-enum) | Moves one line up. | | [Qt.DownArrow](qt.html#ArrowType-enum) | Moves one line down. | | [Qt.LeftArrow](qt.html#ArrowType-enum) | Moves one character to the left. | | [Qt.RightArrow](qt.html#ArrowType-enum) | Moves one character to the right. | | PageUp | Moves one (viewport) page up. | | PageDown | Moves one (viewport) page down. | | Home | Moves to the beginning of the text. | | End | Moves to the end of the text. | | Alt+Wheel | Scrolls the page horizontally (the Wheel is the mouse wheel). | | Ctrl+Wheel | Zooms the text. | | Ctrl+A | Selects all text. | ### Using QPlainTextEdit as an Editor 關于使用QPlainTextEdit作為顯示插件的信息也適用于這里。 選擇文本是由處理[QTextCursor](qtextcursor.html)類,它用于創建選擇,檢索的文本內容或刪除選項提供的功能。你可以檢索與用戶可見的光標使用相對應的對象[textCursor](qplaintextedit.html#textCursor)()方法。如果你想設置一個選擇在QPlainTextEdit只需要建立一個上一個[QTextCursor](qtextcursor.html)對象,然后使該游標使用游標可見[setCursor](qwidget.html#cursor-prop)( ) 。選擇可以復制到剪貼板[copy](qplaintextedit.html#copy)( ) ,或剪切到剪貼板[cut](qplaintextedit.html#cut)( ) 。整個文本可以使用選擇[selectAll](qplaintextedit.html#selectAll)( ) 。 QPlainTextEdit持有[QTextDocument](qtextdocument.html)這可以使用被檢索對象的[document](qplaintextedit.html#document)()方法。您也可以使用設置自己的文檔對象[setDocument](qplaintextedit.html#setDocument)( ) 。[QTextDocument](qtextdocument.html)發出[textChanged](qplaintextedit.html#textChanged)( )信號,如果文本的變化,它也提供了一個通過isModified ( )函數,如果文本已經被修改,因為它是在加載或自上次調用SetModified之用False作為參數,該參數將返回True 。此外,它還提供了撤銷和重做的方法。 #### Syntax Highlighting 一樣[QTextEdit](qtextedit.html), QPlainTextEdit作品連同[QSyntaxHighlighter](qsyntaxhighlighter.html)。 #### Editing Key Bindings 這是實施進行編輯鍵綁定列表: | Keypresses | Action | | --- | --- | | Backspace | Deletes the character to the left of the cursor. | | Delete | Deletes the character to the right of the cursor. | | Ctrl+C | Copy the selected text to the clipboard. | | Ctrl+Insert | Copy the selected text to the clipboard. | | Ctrl+K | Deletes to the end of the line. | | Ctrl+V | Pastes the clipboard text into text edit. | | Shift+Insert | Pastes the clipboard text into text edit. | | Ctrl+X | Deletes the selected text and copies it to the clipboard. | | Shift+Delete | Deletes the selected text and copies it to the clipboard. | | Ctrl+Z | Undoes the last operation. | | Ctrl+Y | Redoes the last operation. | | LeftArrow | Moves the cursor one character to the left. | | Ctrl+LeftArrow | Moves the cursor one word to the left. | | RightArrow | Moves the cursor one character to the right. | | Ctrl+RightArrow | Moves the cursor one word to the right. | | UpArrow | Moves the cursor one line up. | | Ctrl+UpArrow | Moves the cursor one word up. | | DownArrow | Moves the cursor one line down. | | Ctrl+Down Arrow | Moves the cursor one word down. | | PageUp | Moves the cursor one page up. | | PageDown | Moves the cursor one page down. | | Home | Moves the cursor to the beginning of the line. | | Ctrl+Home | Moves the cursor to the beginning of the text. | | End | Moves the cursor to the end of the line. | | Ctrl+End | Moves the cursor to the end of the text. | | Alt+Wheel | Scrolls the page horizontally (the Wheel is the mouse wheel). | | Ctrl+Wheel | Zooms the text. | 選擇(標記)的文本按住Shift鍵的同時按下按鍵的運動之一,例如,_Shift+Right Arrow_將選擇的字符的權利,_Shift+Ctrl+Right Arrow_將選擇字的右邊,等。 ### Differences to QTextEdit QPlainTextEdit是很薄的類,使用最是背后的技術實現[QTextEdit](qtextedit.html)和[QTextDocument](qtextdocument.html)。其性能優勢比[QTextEdit](qtextedit.html)利用所謂的不同和簡化的文本布局大多是干[QPlainTextDocumentLayout](qplaintextdocumentlayout.html)在文本文檔(見[QTextDocument.setDocumentLayout](qtextdocument.html#setDocumentLayout)())。純文本文檔布局不支持表也不嵌入式框架,并_replaces a pixel-exact height calculation with a line-by-line respectively paragraph-by-paragraph scrolling approach_。這使得它可以處理顯著較大的文檔,而且還調整與實時啟用自動換行的編輯器。這也使得快速日志查看器(見[setMaximumBlockCount](qplaintextedit.html#maximumBlockCount-prop)())。 * * * ## Type Documentation ``` QPlainTextEdit.LineWrapMode ``` | Constant | Value | | --- | --- | | `QPlainTextEdit.NoWrap` | `0` | | `QPlainTextEdit.WidgetWidth` | `1` | * * * ## Method Documentation ``` QPlainTextEdit.__init__ (self, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個空[QPlainTextEdit](qplaintextedit.html)與父_parent_。 ``` QPlainTextEdit.__init__ (self, QString?text, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個[QPlainTextEdit](qplaintextedit.html)與父_parent_。文本編輯將顯示純文本_text_。 ``` QString QPlainTextEdit.anchorAt (self, QPoint?pos) ``` 返回錨的位置處的參考_pos_,或者如果沒有錨存在于該點一個空字符串。 此功能被引入Qt的4.7 。 ``` QPlainTextEdit.appendHtml (self, QString?html) ``` 這種方法也是一個Qt槽與C + +的簽名`void appendHtml(const QString&)`。 追加一個新的段落_html_到文本編輯的末尾。 [appendPlainText](qplaintextedit.html#appendPlainText)( ) ``` QPlainTextEdit.appendPlainText (self, QString?text) ``` 這種方法也是一個Qt槽與C + +的簽名`void appendPlainText(const QString&)`。 追加一個新的段落_text_到文本編輯的末尾。 **See also** [appendHtml](qplaintextedit.html#appendHtml)( ) 。 ``` bool QPlainTextEdit.backgroundVisible (self) ``` ``` QRectF QPlainTextEdit.blockBoundingGeometry (self, QTextBlock?block) ``` [](qrectf.html) [返回文本的邊界矩形_block_在內容坐標。翻譯與矩形](qrectf.html)[contentOffset](qplaintextedit.html#contentOffset)()來獲取視口的視覺坐標。 **See also** [firstVisibleBlock](qplaintextedit.html#firstVisibleBlock)()和[blockBoundingRect](qplaintextedit.html#blockBoundingRect)( ) 。 ``` QRectF QPlainTextEdit.blockBoundingRect (self, QTextBlock?block) ``` [ 返回文本的邊界矩形_block_在塊自己的坐標。 ](qrectf.html) [**See also**](qrectf.html) [blockBoundingGeometry](qplaintextedit.html#blockBoundingGeometry)( ) 。 ``` int QPlainTextEdit.blockCount (self) ``` ``` bool QPlainTextEdit.canInsertFromMimeData (self, QMimeData?source) ``` 這個函數返回True,如果MIME數據對象,由指定的內容_source_,可以被解碼并插入到文檔中。它被稱為例如,當拖動操作期間鼠標進入這個小部件,并確定它是否能夠接受拖動它是必要的。 ``` bool QPlainTextEdit.canPaste (self) ``` 返回是否文本可以從剪貼板粘貼到文本編輯。 ``` QPlainTextEdit.centerCursor (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void centerCursor()`。 滾動文件,以垂直居中的光標。 **See also** [ensureCursorVisible](qplaintextedit.html#ensureCursorVisible)()和[centerOnScroll](qplaintextedit.html#centerOnScroll-prop)。 ``` bool QPlainTextEdit.centerOnScroll (self) ``` ``` QPlainTextEdit.changeEvent (self, QEvent?e) ``` 從重新實現[QWidget.changeEvent](qwidget.html#changeEvent)( ) 。 ``` QPlainTextEdit.clear (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void clear()`。 刪除文本編輯中的所有文本。 請注意,撤消/重做歷史是由這個函數清除。 **See also** [cut](qplaintextedit.html#cut)()和[setPlainText](qplaintextedit.html#plainText-prop)( ) 。 ``` QPointF QPlainTextEdit.contentOffset (self) ``` [ 返回視口坐標中的內容的原點。 一個純文本編輯的內容的來源總是第一個可見的文本塊的左上角。內容偏移量是從(0,0)不同的文本時,已滾動水平,或當第一個可見的塊已滾動部分關閉屏幕,也就是可見的文本不啟動的第一個可見塊的第一行,或當第一個可見的塊的第一個塊和編輯器顯示的邊距。 ](qpointf.html) [**See also**](qpointf.html) [firstVisibleBlock](qplaintextedit.html#firstVisibleBlock)( )[horizontalScrollBar](qabstractscrollarea.html#horizontalScrollBar)()和[verticalScrollBar](qabstractscrollarea.html#verticalScrollBar)( ) 。 ``` QPlainTextEdit.contextMenuEvent (self, QContextMenuEvent?e) ``` 從重新實現[QWidget.contextMenuEvent](qwidget.html#contextMenuEvent)( ) 。 顯示與標準上下文菜單創建[createStandardContextMenu](qplaintextedit.html#createStandardContextMenu)( ) 。 如果您不希望文本編輯有個上下文菜單,可以設置其[contextMenuPolicy](qwidget.html#contextMenuPolicy-prop)至[Qt.NoContextMenu](qt.html#ContextMenuPolicy-enum)。如果你想自定義右鍵菜單,重新實現這個函數。如果你想擴展標準上下文菜單,重新實現這個函數,調用[createStandardContextMenu](qplaintextedit.html#createStandardContextMenu)()和extend菜單返回。 有關事件的信息傳遞中_event_對象。 ``` void MyQPlainTextEdit.contextMenuEvent([QContextMenuEvent](qcontextmenuevent.html) *event) { [QMenu](qmenu.html) *menu = createStandardContextMenu(); menu->addAction(tr("My Menu Item")); //... menu->exec(event->globalPos()); delete menu; } ``` ``` QPlainTextEdit.copy (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void copy()`。 副本中的任何選定的文本復制到剪貼板。 **See also** [copyAvailable](qplaintextedit.html#copyAvailable)( ) 。 ``` QMimeData QPlainTextEdit.createMimeDataFromSelection (self) ``` [](qmimedata.html) [這個函數返回一個新的MIME數據對象來表示文本編輯的當前選擇的內容。當選擇需要被封裝到一個新的被稱為](qmimedata.html)[QMimeData](qmimedata.html)對象,例如,當啟動一個拖放操作,或當數據被復制到剪貼板。 如果重新實現此功能,請注意,返回的所有權[QMimeData](qmimedata.html)對象被傳遞給調用者。的選擇可以通過使用檢索到的[textCursor](qplaintextedit.html#textCursor)()函數。 ``` QMenu QPlainTextEdit.createStandardContextMenu (self) ``` [](qmenu.html) [這個函數創建當用戶點擊該行編輯用鼠標右鍵其顯示在標準上下文菜單。它是從默認稱為](qmenu.html)[contextMenuEvent](qplaintextedit.html#contextMenuEvent)()處理。在彈出菜單的所有權被傳遞給調用者。 ``` QTextCharFormat QPlainTextEdit.currentCharFormat (self) ``` [ 返回被插入新文本時所使用的字符格式。 ](qtextcharformat.html) [**See also**](qtextcharformat.html) [setCurrentCharFormat](qplaintextedit.html#setCurrentCharFormat)( ) 。 ``` QTextCursor QPlainTextEdit.cursorForPosition (self, QPoint?pos) ``` [](qtextcursor.html) [返回](qtextcursor.html)[QTextCursor](qtextcursor.html)在位置_pos_(在視口坐標) 。 ``` QRect QPlainTextEdit.cursorRect (self, QTextCursor?cursor) ``` [ 返回一個矩形(在視區坐標) ,其中包括_cursor_。 ](qrect.html) ``` QRect QPlainTextEdit.cursorRect (self) ``` [ 返回一個矩形(在視口中坐標) ,其中包括文本編輯的光標。 ``` int QPlainTextEdit.cursorWidth (self) ``` ``` QPlainTextEdit.cut (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void cut()`。 將所選文本復制到剪貼板,并從文本編輯刪除它。 如果沒有選中的文本沒有任何反應。 ](qrect.html) [**See also**](qrect.html) [copy](qplaintextedit.html#copy)()和[paste](qplaintextedit.html#paste)( ) 。 ``` QTextDocument QPlainTextEdit.document (self) ``` [ 返回一個指針,指向底層的文件。 ](qtextdocument.html) [**See also**](qtextdocument.html) [setDocument](qplaintextedit.html#setDocument)( ) 。 ``` QString QPlainTextEdit.documentTitle (self) ``` ``` QPlainTextEdit.dragEnterEvent (self, QDragEnterEvent?e) ``` 從重新實現[QWidget.dragEnterEvent](qwidget.html#dragEnterEvent)( ) 。 ``` QPlainTextEdit.dragLeaveEvent (self, QDragLeaveEvent?e) ``` 從重新實現[QWidget.dragLeaveEvent](qwidget.html#dragLeaveEvent)( ) 。 ``` QPlainTextEdit.dragMoveEvent (self, QDragMoveEvent?e) ``` 從重新實現[QWidget.dragMoveEvent](qwidget.html#dragMoveEvent)( ) 。 ``` QPlainTextEdit.dropEvent (self, QDropEvent?e) ``` 從重新實現[QWidget.dropEvent](qwidget.html#dropEvent)( ) 。 ``` QPlainTextEdit.ensureCursorVisible (self) ``` 確保光標是在必要時滾動文本編輯可見。 **See also** [centerCursor](qplaintextedit.html#centerCursor)()和[centerOnScroll](qplaintextedit.html#centerOnScroll-prop)。 ``` bool QPlainTextEdit.event (self, QEvent?e) ``` ``` list-of-QTextEdit.ExtraSelection QPlainTextEdit.extraSelections (self) ``` 返回以前設置額外的選擇。 **See also** [setExtraSelections](qplaintextedit.html#setExtraSelections)( ) 。 ``` bool QPlainTextEdit.find (self, QString?exp, QTextDocument.FindFlags?options?=?0) ``` 查找字符串的下一個出現,_exp_,使用給定的_options_。返回True如果_exp_被發現并改變光標選擇匹配,否則返回False 。 ``` QTextBlock QPlainTextEdit.firstVisibleBlock (self) ``` [ 返回第一個可見的塊。 ](qtextblock.html) [**See also**](qtextblock.html) [blockBoundingRect](qplaintextedit.html#blockBoundingRect)( ) 。 ``` QPlainTextEdit.focusInEvent (self, QFocusEvent?e) ``` 從重新實現[QWidget.focusInEvent](qwidget.html#focusInEvent)( ) 。 ``` bool QPlainTextEdit.focusNextPrevChild (self, bool?next) ``` 從重新實現[QWidget.focusNextPrevChild](qwidget.html#focusNextPrevChild)( ) 。 ``` QPlainTextEdit.focusOutEvent (self, QFocusEvent?e) ``` 從重新實現[QWidget.focusOutEvent](qwidget.html#focusOutEvent)( ) 。 ``` QAbstractTextDocumentLayout.PaintContext QPlainTextEdit.getPaintContext (self) ``` [](index.htm) [返回漆上下文](index.htm)[viewport](qabstractscrollarea.html#viewport)( ) ,重新實現只有當有用[paintEvent](qplaintextedit.html#paintEvent)( ) 。 ``` QPlainTextEdit.inputMethodEvent (self, QInputMethodEvent) ``` 從重新實現[QWidget.inputMethodEvent](qwidget.html#inputMethodEvent)( ) 。 ``` QVariant QPlainTextEdit.inputMethodQuery (self, Qt.InputMethodQuery?property) ``` 從重新實現[QWidget.inputMethodQuery](qwidget.html#inputMethodQuery)( ) 。 ``` QPlainTextEdit.insertFromMimeData (self, QMimeData?source) ``` 該功能可以插入的MIME數據對象的內容,由指定的_source_,到在當前光標位置的文本編輯。它被調用時插入文本作為一個剪貼板粘貼操作的結果,或者當文本編輯接受來自拖拽數據和拖放操作。 ``` QPlainTextEdit.insertPlainText (self, QString?text) ``` 這種方法也是一個Qt槽與C + +的簽名`void insertPlainText(const QString&)`。 便利的插槽,插入_text_在當前光標位置。 它相當于 ``` edit->textCursor().insertText(text); ``` ``` bool QPlainTextEdit.isReadOnly (self) ``` ``` bool QPlainTextEdit.isUndoRedoEnabled (self) ``` ``` QPlainTextEdit.keyPressEvent (self, QKeyEvent?e) ``` 從重新實現[QWidget.keyPressEvent](qwidget.html#keyPressEvent)( ) 。 ``` QPlainTextEdit.keyReleaseEvent (self, QKeyEvent?e) ``` 從重新實現[QWidget.keyReleaseEvent](qwidget.html#keyReleaseEvent)( ) 。 ``` LineWrapMode QPlainTextEdit.lineWrapMode (self) ``` [ ``` QVariant QPlainTextEdit.loadResource (self, int?type, QUrl?name) ``` 加載給定指定的資源_type_和_name_。 ](qplaintextedit.html#LineWrapMode-enum) [這個函數是一個擴展](qplaintextedit.html#LineWrapMode-enum)[QTextDocument.loadResource](qtextdocument.html#loadResource)( ) 。 **See also** [QTextDocument.loadResource](qtextdocument.html#loadResource)( ) 。 ``` int QPlainTextEdit.maximumBlockCount (self) ``` ``` QPlainTextEdit.mergeCurrentCharFormat (self, QTextCharFormat?modifier) ``` 在合并中指定的屬性_modifier_成通過在編輯器的光標調用QTextCursor.mergeCharFormat當前字符格式。如果編輯器有一個選擇了屬性_modifier_直接施加到選擇。 **See also** [QTextCursor.mergeCharFormat](qtextcursor.html#mergeCharFormat)( ) 。 ``` QPlainTextEdit.mouseDoubleClickEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseDoubleClickEvent](qwidget.html#mouseDoubleClickEvent)( ) 。 ``` QPlainTextEdit.mouseMoveEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseMoveEvent](qwidget.html#mouseMoveEvent)( ) 。 ``` QPlainTextEdit.mousePressEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mousePressEvent](qwidget.html#mousePressEvent)( ) 。 ``` QPlainTextEdit.mouseReleaseEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseReleaseEvent](qwidget.html#mouseReleaseEvent)( ) 。 ``` QPlainTextEdit.moveCursor (self, QTextCursor.MoveOperation?operation, QTextCursor.MoveMode?mode?=?QTextCursor.MoveAnchor) ``` 通過執行給定的移動光標_operation_。 If _mode_ is [QTextCursor.KeepAnchor](qtextcursor.html#MoveMode-enum),光標選擇它移動到文本上。這是當他們按住Shift鍵并移動光標,光標鍵,用戶達到相同的效果。 **See also** [QTextCursor.movePosition](qtextcursor.html#movePosition)( ) 。 ``` bool QPlainTextEdit.overwriteMode (self) ``` ``` QPlainTextEdit.paintEvent (self, QPaintEvent?e) ``` 從重新實現[QWidget.paintEvent](qwidget.html#paintEvent)( ) 。 ``` QPlainTextEdit.paste (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void paste()`。 從剪貼板粘貼文本到文本編輯的當前光標位置。 如果在剪貼板中沒有文本沒有任何反應。 要更改此函數的行為,即要修改什么[QPlainTextEdit](qplaintextedit.html)可以粘貼以及它是如何被粘貼,重新實現虛[canInsertFromMimeData](qplaintextedit.html#canInsertFromMimeData)()和[insertFromMimeData](qplaintextedit.html#insertFromMimeData)()函數。 **See also** [cut](qplaintextedit.html#cut)()和[copy](qplaintextedit.html#copy)( ) 。 ``` QPlainTextEdit.print (self, QPrinter?printer) ``` 方便的功能,文本編輯的文檔打印到指定的_printer_。這等同于調用print方法上的文件直接,除了這個功能也支持[QPrinter.Selection](qprinter.html#PrintRange-enum)作為打印范圍。 **See also** [QTextDocument.print](qtextdocument.html#print)( ) 。 ``` QPlainTextEdit.print_ (self, QPrinter?printer) ``` 方便的功能,文本編輯的文檔打印到指定的_printer_。這等同于調用print方法上的文件直接,除了這個功能也支持[QPrinter.Selection](qprinter.html#PrintRange-enum)作為打印范圍。 **See also** [QTextDocument.print](qtextdocument.html#print)( ) 。 ``` QPlainTextEdit.redo (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void redo()`。 重做上次操作。 如果沒有操作可以恢復,也就是說,在撤消/重做歷史沒有恢復步驟,沒有任何反應。 **See also** [undo](qplaintextedit.html#undo)( ) 。 ``` QPlainTextEdit.resizeEvent (self, QResizeEvent?e) ``` 從重新實現[QWidget.resizeEvent](qwidget.html#resizeEvent)( ) 。 ``` QPlainTextEdit.scrollContentsBy (self, int?dx, int?dy) ``` 從重新實現[QAbstractScrollArea.scrollContentsBy](qabstractscrollarea.html#scrollContentsBy)( ) 。 ``` QPlainTextEdit.selectAll (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void selectAll()`。 選擇所有文本。 **See also** [copy](qplaintextedit.html#copy)( )[cut](qplaintextedit.html#cut)()和[textCursor](qplaintextedit.html#textCursor)( ) 。 ``` QPlainTextEdit.setBackgroundVisible (self, bool?visible) ``` ``` QPlainTextEdit.setCenterOnScroll (self, bool?enabled) ``` ``` QPlainTextEdit.setCurrentCharFormat (self, QTextCharFormat?format) ``` 設置要插入新的文本時可以使用的字符格式_format_通過調用[QTextCursor.setCharFormat](qtextcursor.html#setCharFormat)( )在編輯器的光標。如果編輯器有一個選擇,則該字符格式被直接施加到選擇。 **See also** [currentCharFormat](qplaintextedit.html#currentCharFormat)( ) 。 ``` QPlainTextEdit.setCursorWidth (self, int?width) ``` ``` QPlainTextEdit.setDocument (self, QTextDocument?document) ``` 品牌_document_在文本編輯器中的新文件。 父[QObject](qobject.html)所提供的文件仍然是對象的所有者。如果當前文件是文本編輯器的一個孩子,然后被刪除。 該文檔必須有一個文檔的布局繼承[QPlainTextDocumentLayout](qplaintextdocumentlayout.html)(見[QTextDocument.setDocumentLayout](qtextdocument.html#setDocumentLayout)())。 **See also** [document](qplaintextedit.html#document)( ) 。 ``` QPlainTextEdit.setDocumentTitle (self, QString?title) ``` ``` QPlainTextEdit.setExtraSelections (self, list-of-QTextEdit.ExtraSelection?selections) ``` 此功能允許暫時標記文檔中的某些區域用給定的顏色,指定為_selections_。這可以是有用的,例如在一個節目的編輯器來標記文本的一整行與給定的背景顏色來表示一個斷點的存在。 **See also** [QTextEdit.ExtraSelection](index.htm)和[extraSelections](qplaintextedit.html#extraSelections)( ) 。 ``` QPlainTextEdit.setLineWrapMode (self, LineWrapMode?mode) ``` ``` QPlainTextEdit.setMaximumBlockCount (self, int?maximum) ``` ``` QPlainTextEdit.setOverwriteMode (self, bool?overwrite) ``` ``` QPlainTextEdit.setPlainText (self, QString?text) ``` 這種方法也是一個Qt槽與C + +的簽名`void setPlainText(const QString&)`。 ``` QPlainTextEdit.setReadOnly (self, bool?ro) ``` ``` QPlainTextEdit.setTabChangesFocus (self, bool?b) ``` ``` QPlainTextEdit.setTabStopWidth (self, int?width) ``` ``` QPlainTextEdit.setTextCursor (self, QTextCursor?cursor) ``` 設置可見_cursor_。 **See also** [textCursor](qplaintextedit.html#textCursor)( ) 。 ``` QPlainTextEdit.setTextInteractionFlags (self, Qt.TextInteractionFlags?flags) ``` ``` QPlainTextEdit.setUndoRedoEnabled (self, bool?enable) ``` ``` QPlainTextEdit.setWordWrapMode (self, QTextOption.WrapMode?policy) ``` ``` QPlainTextEdit.showEvent (self, QShowEvent) ``` 從重新實現[QWidget.showEvent](qwidget.html#showEvent)( ) 。 ``` bool QPlainTextEdit.tabChangesFocus (self) ``` ``` int QPlainTextEdit.tabStopWidth (self) ``` ``` QTextCursor QPlainTextEdit.textCursor (self) ``` [](qtextcursor.html) [返回的副本](qtextcursor.html)[QTextCursor](qtextcursor.html)表示當前可見的光標。請注意,在返回的指針變化不影響[QPlainTextEdit](qplaintextedit.html)的游標;使用[setTextCursor](qplaintextedit.html#setTextCursor)( )來更新可見的光標。 **See also** [setTextCursor](qplaintextedit.html#setTextCursor)( ) 。 ``` Qt.TextInteractionFlags QPlainTextEdit.textInteractionFlags (self) ``` [ ``` QPlainTextEdit.timerEvent (self, QTimerEvent?e) ``` ``` QString QPlainTextEdit.toPlainText (self) ``` ``` QPlainTextEdit.undo (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void undo()`。 撤消上一個操作。 如果沒有操作可以撤銷,也就是說,在撤消/恢復歷史中沒有撤銷一步,沒有任何反應。 ](index.htm) [**See also**](index.htm) [redo](qplaintextedit.html#redo)( ) 。 ``` QPlainTextEdit.wheelEvent (self, QWheelEvent?e) ``` 從重新實現[QWidget.wheelEvent](qwidget.html#wheelEvent)( ) 。 ``` QTextOption.WrapMode QPlainTextEdit.wordWrapMode (self) ``` [ * * * ## Qt Signal Documentation ``` void blockCountChanged (int) ``` 這是該信號的默認超載。 這個信號被發射時的塊數的變化。新的塊數被傳遞_newBlockCount_。 ``` void copyAvailable (bool) ``` 這是該信號的默認超載。 當選擇文本或文本編輯取消選擇,這個信號被發射。 當選擇文本這個信號將被發射_yes_設置為True 。如果沒有文本被選中,或者如果選定的文本被取消選擇這個信號被發射與_yes_設置為False 。 ](qtextoption.html#WrapMode-enum) [If _yes_是真的,那么](qtextoption.html#WrapMode-enum)[copy](qplaintextedit.html#copy)( )可以用來選擇復制到剪貼板。如果_yes_為False,則[copy](qplaintextedit.html#copy)( )什么也不做。 **See also** [selectionChanged](qplaintextedit.html#selectionChanged)( ) 。 ``` void cursorPositionChanged () ``` 這是該信號的默認超載。 這個信號被發射時的光標的位置改變。 ``` void modificationChanged (bool) ``` 這是該信號的默認超載。 這個信號被發射時在文檔的內容改變了,影響到修改狀態的方法。如果_changed_誠然,該文件已被修改,否則為假。 例如,調用SetModified之(假)上的文檔,然后插入文本引起來獲得所發出的信號。如果撤消操作,使所述的文件返回到其原始未修飾的狀態下,信號將得到再次發射。 ``` void redoAvailable (bool) ``` 這是該信號的默認超載。 這個信號被發射時重做操作變得可用(_available_為True)或不可用(_available_是假的) 。 ``` void selectionChanged () ``` 這是該信號的默認超載。 這個信號被發射時的選擇改變。 **See also** [copyAvailable](qplaintextedit.html#copyAvailable)( ) 。 ``` void textChanged () ``` 這是該信號的默認超載。 這個信號被發射時該文檔的內容更改,例如,當文本被插入或刪除,或格式化時被應用。 ``` void undoAvailable (bool) ``` 這是該信號的默認超載。 這個信號被發射時撤銷操作變得可用(_available_為True)或不可用(_available_是假的) 。 ``` void updateRequest (const QRect&,int) ``` 這是該信號的默認超載。 當文本文檔需要指定的更新這個信號被發射_rect_。如果文字滾動,_rect_將復蓋整個視口區域。如果文本是垂直滾動,_dy_進行像素的視口已滾動的量。 信號的目的是支持在該如純文本編輯子類額外的部件顯示行號,斷點,或其他額外的信息。
                  <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>

                              哎呀哎呀视频在线观看