Stylesheet font-size not working with hover



  • Hi, I have a simple problem when applying the following to QPushButton:

    @QPushButton{
    font: 18px;
    }

    QPushButton:hover{
    font: 32px;
    }@

    When my mouse moves over the button, everything inside the hover part of the style sheet is executed, except the font size. Hence, when my mouse moves over the button, the font size doesn't change as it is suppose to.

    Any suggestions?



  • Try font-size instead.



  • font-size also doesn't work. But I've now created a subclass of QPushButton were I hardcoded the change of the stylesheet in the enterEvent(). That works, the effort is just a little more.

    But thanks anyway


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.