We have two interfering button background items right now:
- surfaceNormal when it has activeFocus and is using using the "focus-background" item
After a button is pressed surfacePressed correctly disappears but surfaceNormal remains in the "focus-background" state, thereby making the button still look pressed.
The problem is that the button still has activeFocus even after a press.
To solve this we switch the "focus-background" to only show up on visualFocus. Per Qt documentation on visual Focus:
"In general, for visualizing key focus, this property is preferred over Item::activeFocus. This ensures that key focus is only visualized when interacting with keys - not when interacting via touch or mouse."
Given that we have surfacePressed for focus accomplished with a mouse or touch, visualFocus will only detect tabbing and therefore the button no longer remains pressed after a press and now behaves like its PC2 counterpart.