[Qt-interest] Emulating selection with offsets

sathya tej ragesathya at gmail.com
Tue Apr 21 13:50:09 CEST 2009


Please help me out guys, I am in deep trouble.

Thank You.

Sathya.


On Tue, Apr 21, 2009 at 7:17 AM, sathya tej <ragesathya at gmail.com> wrote:

>
> 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
>



-- 
whatever happens happens for GOOD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090421/69c5f31a/attachment.html 


More information about the Qt-interest-old mailing list