PDA

View Full Version : qpushbuttom text underlined on hover with stylesheet doesn't works.. ¿why?



javimoya
16th July 2009, 15:58
Hi ¡ (sorry for my poor english)

I’m trying to make a flat qpushbuttom looks like an hyperlink using stylesheets. I want that when I move the mouse inside the buttom (hover), the text should change his color and appears underlined. But… it doesn’t works !

This is the stylesheet:

QPushButton {
font: 75 8pt "Tahoma";
color: rgb(16, 37, 127);
text-align: left;
border: none;
text-decoration: none;
}

QPushButton:hover {
color: rgb(116, 137, 127);
text-decoration: underline;
}

It’s very strange… because it changes the color… but not add the underline.

Maybe… should I repaint the qpushbuttom dynamically when I hover it? how can I do this (how call for repaint a widget)?

Thank you