Results 1 to 2 of 2

Thread: How to create a HyperLink in Qt?

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question How to create a HyperLink in Qt?

    Hi All,

    I m using Qt 4.2.2 on my Intel Mac.

    I want to create a Link so that If I clicked that Link the Corresponding URL would open.
    If any body knows how to create HyperLink in Qt plz help me.

    thanks.

  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 to create a HyperLink in Qt?

    Qt Code:
    1. QLabel *label = new QLabel(this);
    2. label->setText("<a href=\"http://www.qtcentre.org\">QtCentre</a>");
    3. label->setOpenExternalLinks(true);
    To copy to clipboard, switch view to plain text mode 

  3. The following 2 users say thank you to wysota for this useful post:

    Lawand (17th October 2010), vishal.chauhan (27th March 2007)

Similar Threads

  1. how to create resource fork & data fork
    By jyoti in forum General Discussion
    Replies: 4
    Last Post: 28th November 2006, 17:20
  2. Replies: 1
    Last Post: 24th October 2006, 16:40
  3. How to create an Insert/Submit button for a form.
    By fnmblot in forum Qt Programming
    Replies: 5
    Last Post: 4th August 2006, 16:18
  4. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 10:04
  5. using Mysql: Ca't create TCP/IP socket
    By blackliteon in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2006, 18:25

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.