Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QTextCursor::beginEditBlock (  ) 

Indicates the start of a block of editing operations on the document that should appear as a single operation from an undo/redo point of view.

For example:

doc/src/snippets/code/src_gui_text_qtextcursor.cpp 2

The call to undo() will cause both insertions to be undone, causing both "World" and "Hello" to be removed.

It is possible to nest calls to beginEditBlock and endEditBlock. The top-most pair will determine the scope of the undo/redo operation.

See also:
endEditBlock()

Definition at line 2221 of file qtextcursor.cpp.

Referenced by MainWindow::addParagraph(), MainWindow::highlightListItems(), MainWindow::insertCustomer(), MainWindow::insertList(), TextFinder::on_findButton_clicked(), QSyntaxHighlighter::rehighlight(), MainWindow::selectWord(), and QSyntaxHighlighter::setDocument().

{
    if (!d || !d->priv)
        return;

    d->priv->beginEditBlock();
}


Generated by  Doxygen 1.6.0   Back to index