PDA

View Full Version : QTextEdit::find() backward not working



sukanyarn
15th November 2006, 04:30
Hello,

I am working with QTextEdit for developing Plain Text Editor.
I am trying to implement search forward/backward functionality for the plain text editor, using QTextEdit::find().
Search forward is working very fine, but search backward is not happening properly.
I have found that search backward happens only once. I mean the function QTextEdit::find() searches for the required text only once from the current cursor position.
I would like to know if this is a known bug in Qt3.3.2 ?
Or, is there any solution for this?

Thanks in advance,
sukanya

piotrek
15th November 2006, 19:33
When you search a word and he was found, this word is selected.
Cursor is AFTER last character of this selection.
When you search backwards you search BEFOR curent cursor position.
At this moment you find everytime te same word (endless).
Befor next find-backwards you must first sets the cursor position befor first char of current selection.