[Qt-interest] Emulating selection with offsets
sathya tej
ragesathya at gmail.com
Tue Apr 21 03:47:44 CEST 2009
Hello all,
I have a text file. I only have startOffset and endOffset of a section of
text in that file.
I need to highlight that section.
I used the below approach but failed.
Please guide me.
QTextCursor *cur = new QTextCursor();
textEditorArray[textEditorCount]->setTextCursor(*cur);
cursor->setPosition (startOffset , QTextCursor::MoveAnchor );
cursor->movePosition ( QTextCursor::NextCharacter, QTextCursor::KeepAnchor,
endOffset - startOffset);
textEditorArray[textEditorCount]->setFontUnderline(true);
--
whatever happens happens for GOOD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090421/d05c5068/attachment.html
More information about the Qt-interest-old
mailing list