View Full Version : Change color of a link in QLabel using Style Sheets?
codeslicer
15th April 2008, 02:20
Hello, I have a QLabel with a link in it inserted with rich text. How would I change the color of that link? Changing the color property of QLabel doesn't seem to do anything. Thanks in advance!
wysota
15th April 2008, 07:15
You can use CSS to change the color.
label->setText("<a href=\"http://www.qtcentre.org\" style=\"color: red;\">Qt Centre</a>");
codeslicer
15th April 2008, 11:00
Wow! So obvious yet so discreet. Thanks!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.