Results 1 to 7 of 7

Thread: How I get the cursor position in QTextView (qt2)

  1. #1

    Question How I get the cursor position in QTextView (qt2)

    I want to get the text of current cursor position.

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

    Default Re: How I get the cursor position in QTextView (qt2)

    I don't think you can.

  3. #3

    Question Re: How I get the cursor position in QTextView (qt2)

    http://example
    when I move the cursor to the URL above, How can I know this is a URL .
    if QTextView cannot support this function, can other class support, or I have to inherit one?
    Last edited by pencilren; 30th May 2007 at 09:59. Reason: reformatted to look better

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How I get the cursor position in QTextView (qt2)

    QTextEdit should.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    Default Re: How I get the cursor position in QTextView (qt2)

    I think you have to use QTextBrowser for that.

    QTextEdit should.
    He's using Qt2.

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How I get the cursor position in QTextView (qt2)

    He's using Qt2.
    Oops, soory.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7

    Default Re: How I get the cursor position in QTextView (qt2)

    but I use qt2 not 4, and in qt2 I cannot find QTextEdit
    Last edited by pencilren; 30th May 2007 at 10:26. Reason: reformatted to look better

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.