Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved]While we are using Qlabel as hyperlink text how we can remove the line below the hyperlink text in normal state?
Qt 6.11 is out! See what's new in the release blog

[solved]While we are using Qlabel as hyperlink text how we can remove the line below the hyperlink text in normal state?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pratik041
    wrote on last edited by
    #1

    I want the line to appear only when we hovered or press the hyperlink text not in normal state and i want to change the color of the text also. i have tried Qpalette but i found no change in color.

    Pratik Agrawal

    1 Reply Last reply
    0
    • R Offline
      R Offline
      robi
      wrote on last edited by
      #2

      Hello, Though i am new in qt but i hope i can help you a little,You can embed pure css in qt app if want for changing the state of qlabel...Like the following code snippet..
      assume that "label" is a qlabel object then you can use #label:hover{color:green;} for hovering effect
      try it...

      robi

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pratik041
        wrote on last edited by
        #3

        ok i will try

        Pratik Agrawal

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pratik041
          wrote on last edited by
          #4

          I have tried this it is working.
          @label->setText("<html> <a style = 'text-decoration:none'href ='link'>Sign In</a></html>");@

          Pratik Agrawal

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved