PDA

View Full Version : Changing the color of the link on hover using stylesheets..



pyqt123
1st March 2010, 16:13
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_addFileTypesTextBrowserIn Table.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..

yodasoda
2nd March 2010, 09:21
if you specify a color when its not being hovered then that attribute overwrites the ones you put here. if you actually have more stylre in there and you remove all the others it should fix it.

pyqt123
4th March 2010, 10:59
if you specify a color when its not being hovered then that attribute overwrites the ones you put here. if you actually have more stylre in there and you remove all the others it should fix it.

Thanks yodasoda.. But can u provide me some sample code by taking off ur precious time.. I think it won't take more than three lines..