Results 1 to 4 of 4

Thread: Turn off the underline when using a QLabel as a link

  1. #1
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Turn off the underline when using a QLabel as a link

    I have a QLabel setup as a hyperlink. The default is to underline it. Does anyone know how to turn off the underline?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Turn off the underline when using a QLabel as a link

    Have you tried to use a stylesheet?

  3. #3
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Turn off the underline when using a QLabel as a link

    I have not looked at a style sheet. I've never used style sheets, do you know what the style sheet would look like?

  4. #4
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Turn off the underline when using a QLabel as a link

    Qt Code:
    1. label.setText("<a href=url style=\"text-decoration:none;\">here</a>");
    To copy to clipboard, switch view to plain text mode 

    HIH

    Johannes

  5. The following user says thank you to JohannesMunk for this useful post:

    gmat4321 (13th April 2010)

Similar Threads

  1. Replies: 1
    Last Post: 29th September 2009, 19:44
  2. Replies: 0
    Last Post: 18th March 2009, 06:15
  3. Change color of a link in QLabel using Style Sheets?
    By codeslicer in forum Qt Programming
    Replies: 2
    Last Post: 15th April 2008, 11:00
  4. Replies: 2
    Last Post: 14th January 2008, 18:09
  5. QLabel link color
    By dragon in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2007, 07:09

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.