Results 1 to 13 of 13

Thread: QTextEdit and mark Text

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QTextEdit and mark Text

    find() can fail (return a null cursor) in two cases - either the searched term doesn't exist in the text or it exists but you told find() to skip the part of text where the searched term exists (that's what the cursor argument to find() is for).

  2. #2

    Default Re: QTextEdit and mark Text

    And how can I tell find() not to skip the part?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QTextEdit and mark Text

    Pass it an empty cursor or one that is positioned at the beginning of the text.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.