Lykurg
24th June 2009, 15:18
Hi,
how can an own widget (subclass of QWidget) gain the ":hover" settings from the style sheet? E.g.:
void MyOwnWidget::paintEvent(QPaintEvent*)
{
QPainter p(this);
p.drawText(rect(), Qt::AlignCenter, "foo bar");
}
gets the definitions from
MyOwnWidget
{
color: #dddddd;
font-size: 36px;
}
but not from MyOwnWidget:hover
{
color: #ffdddd;
font-size: 8px;
}
How could one fetch these settings? Any hints?
Thanks, Lykurg
how can an own widget (subclass of QWidget) gain the ":hover" settings from the style sheet? E.g.:
void MyOwnWidget::paintEvent(QPaintEvent*)
{
QPainter p(this);
p.drawText(rect(), Qt::AlignCenter, "foo bar");
}
gets the definitions from
MyOwnWidget
{
color: #dddddd;
font-size: 36px;
}
but not from MyOwnWidget:hover
{
color: #ffdddd;
font-size: 8px;
}
How could one fetch these settings? Any hints?
Thanks, Lykurg