The toolbar most likely has a slot that is connected to the QAction::hover() signal, and it is in this slot where the button's state icons are changed.