Results 1 to 3 of 3

Thread: Getting current anchor in QTextEdit

  1. #1
    Join Date
    Jun 2010
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Getting current anchor in QTextEdit

    I am trying to create a rich text editor that will insert HTML links to websites etc. It is working fine except for when I select the text again and try to change the URL, I am not able to. Is there a way we can tell what is the HTML anchor at the current cursor location?

    For e.g.

    if the (text) cursor is currently anywhere between the Google word, or any part or whole of Google text is selected I want to get the existing URL so that it can be edited, instead of inserting a new URL altogether.


    Qt Code:
    1. <a href="http://www.google.com/">Google</a>
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

  3. #3
    Join Date
    Jun 2010
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting current anchor in QTextEdit


Similar Threads

  1. Replies: 2
    Last Post: 20th February 2012, 22:58
  2. QTextEdit current cursor text format
    By afail in forum Qt Programming
    Replies: 0
    Last Post: 13th April 2009, 15:24
  3. How to get current word in Qtextedit
    By iamjayanth in forum Qt Programming
    Replies: 5
    Last Post: 6th April 2009, 09:57
  4. How to get current character from QTextEdit
    By iamjayanth in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2009, 09:05
  5. Current char in QTextEdit
    By jlbrd in forum Qt Programming
    Replies: 1
    Last Post: 12th August 2006, 10:30

Tags for this Thread

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.