这是我想要的效果:
这是实际效果。
//follow is code i code:
SendScintilla(QsciScintillaBase::SCI_INDICSETSTYLE,0, INDIC_ROUNDBOX);
SendScintilla(QsciScintillaBase::SCI_INDICSETFORE,0, QColor(Qt::yellow));
答案 0 :(得分:0)
This is my answer.
SendScintilla(QsciScintillaBase::SCI_INDICSETSTYLE,0, INDIC_BOX);
QString docText = text();
int end = docText.lastIndexOf(findText);
int cur = -1;
if(end != -1) {
while(cur != end) {
cur = docText.indexOf(findText,cur+1);`
SendScintilla(QsciScintillaBase::SCI_INDICATORFILLRANGE,cur,
findText.length());
}
}