QTEXTEDIT FIND BACKWARD
-
I don't understand why the find forward is working well but not the find backwark (flag QTextDocument::FindBackward) that skips the first previous occurence of a search). How to solve this issue?
-
void MainWindow::rechercheNext(QString texte,bool fBackward,bool fCaseSensitive, bool fWholeWord)
{
QTextDocument::FindFlags flag=0;
if (fBackward)
flag= QTextDocument::FindBackward;
if (fCaseSensitive)
flag = flag | QTextDocument::FindCaseSensitively;
if (fWholeWord)
flag = flag | QTextDocument::FindWholeWords;
bool f=textEdit->find(texte,flag);
}If in the textedit document there is the following text (a "a" character on each line as shown)
a
a
a
aWhen the cursor is at the end of the document, the find backward mode skips one "a" on 2
-
I have reported the bug. I will feed back when the issue is solved
-
Hi,
Can you share the bug report link ? That will make it easier for others to find it