[solved] a:hover html css in QLabel not working.
-
@ ui->label->setText("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN' 'http://www.w3.org/TR/REC-html40/strict.dtd'>"
"<html><head><style type=text/css>"
"a {color:#55789b; text-decoration:none;}"
"a:hover {color:#f9e699; text-decoration:underline;}"
"</style></head><body><a href='http://google.com'>google</a></body></html>");
@
this code not working. why? and how to do correct?
line "a { ... }" working, but on hover - no reaction about color changing and underliling. -
Normally none of the mouse interaction affect the text, the only exception concerns the links.
-
thnx. I got it and doing throw setCursor, Qss for label and eventFilter for click =(
-
Hi,
I'm also facing the same problem. Need to change the text color of the QLabel when I hover the text. Please see my below code:
@
mylabel->setText("<a > click here </a>");
@
I need to do it using qss file?