Results 1 to 7 of 7

Thread: QTextEdit and URL clicked signal

  1. #1
    Join Date
    Apr 2012
    Posts
    40
    Platforms
    Unix/X11 Windows

    Default QTextEdit and URL clicked signal

    Hi
    I need make signal in QTextEdit when URL will by clicked and this sgnal mass have URL as parameter ( for example SIGNAL(urlClick(QString f_URL)))
    Can do that ??

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

    Default Re: QTextEdit and URL clicked signal

    Combine mouse events with QTextEdit::anchorAt() or use QTextBrowser which has a QTextBrowser::anchorClicked() signal.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2012
    Posts
    40
    Platforms
    Unix/X11 Windows

    Default Re: QTextEdit and URL clicked signal

    It mass be on QTextEdit.
    With mouse event and QTextEdit::anchorAt() will be very difficul because in my aplication will be can add and remove URL ;(
    There is no other way ?

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

    Default Re: QTextEdit and URL clicked signal

    I don't know what other way than handling mouse events you would like to have.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Apr 2012
    Posts
    40
    Platforms
    Unix/X11 Windows

    Default Re: QTextEdit and URL clicked signal

    Maybey other way.
    My app is a notepad, the URL will by path to file and i want do somthing like that, if URL will bee clicked then app open this file in window.

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

    Default Re: QTextEdit and URL clicked signal

    I still don't understand what does it have to do with my solution.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Apr 2012
    Posts
    40
    Platforms
    Unix/X11 Windows

    Default Re: QTextEdit and URL clicked signal

    Srry, Its work Thx for help

Similar Threads

  1. clicked() signal for QLineEdit
    By smarinr in forum Qt Programming
    Replies: 10
    Last Post: 26th June 2019, 16:35
  2. clicked signal from QMainWindow
    By Tomasz in forum Newbie
    Replies: 3
    Last Post: 13th December 2010, 14:12
  3. QTreeWidget clicked signal
    By ^NyAw^ in forum Qt Programming
    Replies: 41
    Last Post: 30th January 2010, 11:42
  4. signal mapping on pushbutton signal clicked
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 07:54
  5. QListWidget clicked signal
    By asieriko in forum Qt Programming
    Replies: 12
    Last Post: 10th August 2007, 15:37

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.