Important: Please read the Qt Code of Conduct -

Why is it so hard to style the links in a QLabel?

  • I really have to wonder... you can style almost every aspect of a Qt App but the links inside a QLabel always look the same. Its not respecting the widgets QPalette, not the apps QPalette, not the apps/widgets CSS... nothing. Making links in a different colour and react on hover with a change in text-decoration is impossible it seems.

  • Hi,

    try this:


    qproperty-text:"<aa href="" style="color: rgba(0,255,0,255)">QtCentre</a>";/* delete one a*/



    though I have found no way to set text'color on hover

  • Thanks for your efforts. I think I will go with a custom control. All this hacking and the links colour can still not be changed on hover :/

Log in to reply