PDA

View Full Version : Change frame background color



Ishmael
6th June 2010, 23:34
I would like to change the background color of a frame (on a mouseEnter event). I have tried using
this->setStyleSheet("background-color: red"); but as you can see in the attached image, the formatting gets all messed up. How do I change only the background color, leaving everything else intact?

aamer4yu
7th June 2010, 05:38
You can mention the class you want to set the stylesheet for, so that it doesnt affect other widgets.
eg. setStyleSheet(" .QFrame { background-color : red } ");