This is something you handle in code, not in designer.

You need a function in your code that has the "back logic" and you connect the button's signal to that function.

Cheers,
_