[Qt-interest] qpushbuttom text underlined on hover with stylesheet doesn't works.. ¿why?

Enrique Cuesta enriquecues at gmail.com
Thu Jul 16 14:04:21 CEST 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090716/4e4e736d/attachment.html 


More information about the Qt-interest-old mailing list