QPlainTextDocumentLayout

Inheritance diagram of QPlainTextDocumentLayout

Synopsis

Functions

Detailed Description

The 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 . See QTextDocument.setDocumentLayout() .

PySide.QtGui.QPlainTextDocumentLayout uses the 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.

class PySide.QtGui.QPlainTextDocumentLayout(document)
Parameters:documentPySide.QtGui.QTextDocument

Constructs a plain text document layout for the text document .

PySide.QtGui.QPlainTextDocumentLayout.blockWidth(block)
Parameters:blockPySide.QtGui.QTextBlock
Return type:PySide.QtCore.qreal
PySide.QtGui.QPlainTextDocumentLayout.cursorWidth()
Return type:PySide.QtCore.int

This property specifies the width of the cursor in pixels. The default value is 1.

PySide.QtGui.QPlainTextDocumentLayout.ensureBlockLayout(block)
Parameters:blockPySide.QtGui.QTextBlock

Ensures that block has a valid layout

PySide.QtGui.QPlainTextDocumentLayout.layoutBlock(block)
Parameters:blockPySide.QtGui.QTextBlock
PySide.QtGui.QPlainTextDocumentLayout.requestUpdate()

Requests a complete update on all views.

PySide.QtGui.QPlainTextDocumentLayout.setCursorWidth(width)
Parameters:widthPySide.QtCore.int

This property specifies the width of the cursor in pixels. The default value is 1.

PySide.QtGui.QPlainTextDocumentLayout.setTextWidth(newWidth)
Parameters:newWidthPySide.QtCore.qreal
PySide.QtGui.QPlainTextDocumentLayout.textWidth()
Return type:PySide.QtCore.qreal