
Originally Posted by
codeslicer
I have different event handlers which draw buttons which fade in and out when the mouse hovers over them. Then I want a plain skin which uses the system's window manager to do all the work. Does the QStyle class support this situation? Thanks so far though

That's possible for hovering you should use styles like this
{
background-image: url(:/images/Buttons_Styles/b_butt_free.png);
border: none;
}
{
background-image: url(:/images/Buttons_Styles/b_butt_over.png);
border: none;
}
{
background-image: url(:/images/Buttons_Styles/b_butt_down.png);
border: none;
}
{
background-image: url(:/images/Buttons_Styles/b_butt_disabled.png);
border: none;
}
QPushButton
{
background-image: url(:/images/Buttons_Styles/b_butt_free.png);
border: none;
}
QPushButton:hover
{
background-image: url(:/images/Buttons_Styles/b_butt_over.png);
border: none;
}
QPushButton:pressed
{
background-image: url(:/images/Buttons_Styles/b_butt_down.png);
border: none;
}
QPushButton:disabled
{
background-image: url(:/images/Buttons_Styles/b_butt_disabled.png);
border: none;
}
To copy to clipboard, switch view to plain text mode
And then use QWidget::setStyleSheet
Bookmarks