PySide6.QtWidgets.QPlainTextDocumentLayout¶
- class QPlainTextDocumentLayout¶
- The - QPlainTextDocumentLayoutclass implements a plain text layout for QTextDocument. More…- Synopsis¶- Properties¶- Methods¶- def - __init__()
- def - cursorWidth()
- def - requestUpdate()
- def - setCursorWidth()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- A - QPlainTextDocumentLayoutis required for text documents that can be display or edited in a- QPlainTextEdit. See QTextDocument::setDocumentLayout().- QPlainTextDocumentLayoutuses the QAbstractTextDocumentLayout API that QTextDocument requires, but redefines it partially in order to support plain text better. For instances, it does not operate on vertical pixels, but on paragraphs (called blocks) instead. The height of a document is identical to the number of paragraphs it contains. The layout also doesn’t support tables or nested frames, or any sort of advanced text layout that goes beyond a list of paragraphs with syntax highlighting.- Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property cursorWidthᅟ: int¶
 - This property specifies the width of the cursor in pixels. The default value is 1. - Access functions:
 - __init__(document)¶
- Parameters:
- document – - QTextDocument
 
 - Constructs a plain text document layout for the text - document.- cursorWidth()¶
- Return type:
- int 
 - See also 
 - Getter of property - cursorWidthᅟ.- ensureBlockLayout(block)¶
- Parameters:
- block – - QTextBlock
 
 - Ensures that - blockhas a valid layout- requestUpdate()¶
 - Requests a complete update on all views. - setCursorWidth(width)¶
- Parameters:
- width – int 
 - See also 
 - Setter of property - cursorWidthᅟ.