MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / highlight

Method highlight

src/jsplugin/JSRepl.cpp:308–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308void JSReplSearchBox::highlight(const QTextCursor &cursor)
309{
310 QList<QTextEdit::ExtraSelection> extraSelections;
311
312 QTextEdit::ExtraSelection selection;
313 QColor lineColor = QColor(Qt::yellow).lighter(160);
314
315 selection.format.setBackground(lineColor);
316 selection.format.setProperty(QTextFormat::FullWidthSelection, true);
317 selection.cursor = cursor;
318 selection.cursor.clearSelection();
319 extraSelections.append(selection);
320
321 textEdit->setExtraSelections(extraSelections);
322}

Callers 3

explorer.jsFile · 0.80
mathjax-sre.jsFile · 0.80

Calls 2

setPropertyMethod · 0.80
QColorClass · 0.50

Tested by

no test coverage detected