Results 1 to 3 of 3

Thread: How to get URL referred to by the anchor in QTextBrowser

  1. #1
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy How to get URL referred to by the anchor in QTextBrowser

    Hi all,

    anchorClicked signal is emitted when the user clicks an anchor in the QTextBrowser and the URL referred to by the anchor is passed in link. But this signal can not be connected to a slot having paramater. So i am connecting this signal as follows - connect(browser,SIGNAL(anchorClicked (const QUrl &)),this,SLOT(onResourcesLinkClick ()));.
    so please tell me how to get the URL referred to by the anchor. QTextBrowser has a method
    anchorAt, but how to get index(QPoint) for it.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to get URL referred to by the anchor in QTextBrowser

    Quote Originally Posted by prakash
    But this signal can not be connected to a slot having paramater.
    Why couldn't?
    Maybe there was a mismatch in the types of your slot's parameters. They must be exactly the same.

  3. #3
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to get URL referred to by the anchor in QTextBrowser

    Thanks, I Got it sloved. Please tell me how to remove this thread. I am going to post a new one.

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.