Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QStyle animations
Forum Updated to NodeBB v4.3 + New Features

QStyle animations

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 536 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Name already in useN Offline
    Name already in useN Offline
    Name already in use
    wrote on last edited by
    #1

    Hello,
    I'm currently trying to write a custom style by subclassing QProxyStyle.
    What i want to achieve now is to animate the color changes to buttons when they are hovered, as it is done in QWindowsVistaStyle, for example.
    Is there a good way to do this with QStyle?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi and welcome to the forums
      Well it's possible but I think subclassing a QPushButton and use a QPropertyAnimation might be easier.

      Maybe you can use the QProxyStyle. never tried animation with it though.

      So is the goal to have a 100% normal looking button with animated background color
      or would a more custom looking one also do ?

      1 Reply Last reply
      2
      • Name already in useN Offline
        Name already in useN Offline
        Name already in use
        wrote on last edited by Name already in use
        #3

        I'm sorry for the late reply;
        No, the button needn't look normal because I already use a customized QStyle in my application. But the problem that comes with this is that I cannot use stylsheets with QPropertyAnimations for the animation like I'd normally do.

        mrjjM 1 Reply Last reply
        0
        • Name already in useN Name already in use

          I'm sorry for the late reply;
          No, the button needn't look normal because I already use a customized QStyle in my application. But the problem that comes with this is that I cannot use stylsheets with QPropertyAnimations for the animation like I'd normally do.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Name-already-in-use

          Hi
          Np.
          Well Stylesheets are not meant for animations as such.

          What type of animation did you have in mind ?

          Maybe this can inspire you
          https://github.com/laserpants/qt-material-widgets

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved