Nothing quite adds a sophisticated edge to a GUI like the tasteful use of animations. Dynamic GUI elements that fade smoothly between changes in color, size, or position can add a modern touch to any interface.
Qt's animation framework allows us to create simple animations on our widgets using the QPropertyAnimation class. In this section, we'll explore how to use this class to spice up our game lobby with some animations.
Because Qt style sheets override another widget- and palette-based styling, you will need to comment out all the style sheet code for these animations to work correctly.