This is all the code you need in your widget
If you are new with UMG and you don’t see the button events you have to set the buttons as variables in the designer: