This is a completely different situation. Notice that in the docs the "clicked" method is not implemented. It is a signal which is then connected to some other slot (which is not part of the example). Since you implemented "clicked" this can't be a signal (and the compiler should refuse to build such a program). It would be ok to use a signal if you moved the body of "clicked" to another method (slot), most probably in a different object.