PDA

View Full Version : Replace text



Hz
22nd March 2006, 08:59
To replace text of TextBlock by my text i use:

cursor = QTextCursor(block);
сursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
cursor.insertText(newText);

But is real slowly . Any ideas?

zlatko
22nd March 2006, 09:05
QString::replase() doesnt help?

Hz
22nd March 2006, 09:16
i work with QTextDocument
so i think QString::replace is not real useable
hard to find text to replace if many equal lines