Highlighting widget
-
I have a couple of dock widgets with multiple tabs in each. It can happen that I have to programmatically change the focus and the active tab of a dock widget. In that case I'd like to highlight the widget with a simple and short "flash" animation.
As Qt doesn't seem to support such behavior by default I took a look atQPropertyAnimation
and used this to change the background color. However, obviously this is not a good solution as I'd have to reset the background color property back to its initial state after the animation.
Hence my question: What is the proper way of highlighting aQWidget
with a simple flash animation to show draw the users attention on a certain widget? Would it make sense to overlay aQRubberBand
and change it's opacity level usingQPropertyAnimation
?I'd be thankful for any kind of suggestion.