Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

hover effect on qwidget



  • i've subclassed qframe and i wanna get a hovering effect. i want some button-ish effect (like background) but i can't come up with styles to apply. what can i use?

    p.s. i know that i could've subclassed some button but in my case i found it easier to subclass qframe


  • Moderators

    @user4592357
    QFrame is such a simple widget that it doesn't support the :hover pseudo state.
    Thus you would have to listen to the enter/leave events yourself and adapt the background dynamically.


Log in to reply