Underline QLabel's text "on hover"
<p>I want to turn the text green and underline it when the mouse cursor goes over a <code>QLabel</code>, however, it just turns green, it does not get underlined.</p>

<pre><code>  QLabel:hover { color: green; text-decoration: underline;}
</code></pre>

<p>What am I doing wrong?</p>

<p><strong>EDIT:</strong>
Fixed, I used:</p>

<pre><code>void QClickableLabel::enterEvent (QEvent *event)
{
    Q_UNUSED (event);
    setStyleSheet ("QLabel { color: green; text-decoration: underline; }");
}

void QClickableLabel::leaveEvent (QEvent *event)
{
    Q_UNUSED (event);
    setStyleSheet ("QLabel { color: black; }");
}
</code></pre>