I can't see output pin in the function

Your “cast to Widget” node failed. Put a “Print string” node to “Cast Failed” exec and you will see that it failed