tags:

views:

47

answers:

1

Hai all,

I don't know why the following lines of code isn't working. My aim is to change color of the text when the link is hovered..

self.syncFolderSelection_addFileTypesTextBrowserInTable.setStyleSheet("QTextBrowser:hover{color:#00ff00;background-color:#ff0000;}")

The BG color chages without any error but the foreground color is not. Can anybody correct me..

A: 

The QTextBrowser displays HTML source, so if you want to change the color of links in the HTML, add <style> tags with your updated styles to the HTML source before sending it to the QTextBrowser.

jcoon
Thanks jcoon for your reply.. But can u show me a minimal example?? I couldn't understand this..
Jebagnanadas