PySide.QtGui.QPlainTextDocumentLayout class implements a plain text layout for PySide.QtGui.QTextDocument
A PySide.QtGui.QPlainTextDocumentLayout is required for text documents that can be display or edited in a PySide.QtGui.QPlainTextEdit 。见 QTextDocument.setDocumentLayout() .
PySide.QtGui.QPlainTextDocumentLayout 使用 PySide.QtGui.QAbstractTextDocumentLayout API that PySide.QtGui.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.
| 参数: | document – PySide.QtGui.QTextDocument |
|---|
构造纯文本文档布局为文本 document .
| 参数: | block – PySide.QtGui.QTextBlock |
|---|---|
| 返回类型: | PySide.QtCore.qreal |
| 返回类型: | PySide.QtCore.int |
|---|
此特性指定光标的宽度 (以像素为单位)。默认值为 1。
| 参数: | block – PySide.QtGui.QTextBlock |
|---|
Ensures that block has a valid layout
| 参数: | block – PySide.QtGui.QTextBlock |
|---|
请求对所有视图,进行完整更新。
| 参数: | width – PySide.QtCore.int |
|---|
此特性指定光标的宽度 (以像素为单位)。默认值为 1。
| 参数: | newWidth – PySide.QtCore.qreal |
|---|
| 返回类型: | PySide.QtCore.qreal |
|---|