PDA

View Full Version : setFlat(true) and QPushButtton:hover



somename
28th May 2010, 00:59
Buttons[i]->setFlat(true);
Buttons[i]->setStyleSheet("QPushButton:hover{background: red;}");

it works well without "Buttons[i]->setFlat(true);".
but how to do with this?

Lykurg
28th May 2010, 08:04
You have to add border: 0; to activate "background" for your button.

aamer4yu
28th May 2010, 08:14
You have to add border: 0; to activate "background" for your button.

Just curious.. is it documented ?

Lykurg
28th May 2010, 11:00
Just curious.. is it documented ?
No, not that I am aware of. It's originated by my ingenious nature:D
(Just figured it out some day while "playing" around...)

aamer4yu
28th May 2010, 11:13
(Just figured it out some day while "playing" around...)
Are there more such play docs :cool:
If there are many such,there should be a wiki section of such findings while playing around ;)