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

void QTextCursor::mergeCharFormat ( const QTextCharFormat modifier  ) 

Merges the cursor's current character format with the properties described by format modifier. If the cursor has a selection, this function applies all the properties set in modifier to all the character formats that are part of the selection.

See also:
hasSelection(), setCharFormat()

Definition at line 1712 of file qtextcursor.cpp.

References charFormat(), and QTextFormat::merge().

Referenced by TextFinder::on_findButton_clicked().

    if (!d || !d->priv)
    if (d->position == d->anchor) {
        QTextCharFormat format = charFormat();
        d->currentCharFormat = d->priv->formatCollection()->indexForFormat(format);

    d->setCharFormat(modifier, QTextDocumentPrivate::MergeFormat);

Generated by  Doxygen 1.6.0   Back to index