QPlainTextDocumentLayoutclass implements a plain text layout forQTextDocument. 更多 …
def
cursorWidth
()
def
ensureBlockLayout
(block)
def
requestUpdate
()
def
setCursorWidth
(width)
A
QPlainTextDocumentLayoutis required for text documents that can be display or edited in aQPlainTextEdit。见setDocumentLayout().
QPlainTextDocumentLayout使用QAbstractTextDocumentLayoutAPI thatQTextDocumentrequires, 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.
QPlainTextDocumentLayout
(
document
)
¶
- param document
QTextDocument
构造纯文本文档布局为文本
document
.
PySide2.QtWidgets.QPlainTextDocumentLayout.
cursorWidth
(
)
¶
int
另请参阅
PySide2.QtWidgets.QPlainTextDocumentLayout.
ensureBlockLayout
(
block
)
¶
block
–
QTextBlock
Ensures that
block
has a valid layout
PySide2.QtWidgets.QPlainTextDocumentLayout.
requestUpdate
(
)
¶
请求对所有视图,进行完整更新。
PySide2.QtWidgets.QPlainTextDocumentLayout.
setCursorWidth
(
width
)
¶
width
–
int
另请参阅