All of a sudden when I add a button and do go to slot
What?

the declaration and function for the slot is added in the .h header file
Ok.

and the function is not called.
What? Do you have an IDE problem or a run-time problem? Try to keep threads related to only one issue otherwise things get too difficult to follow.