It sounds like you are asking for a slot to be called any time a button is clicked, whether you connect to its signal or not. How would that even be possible? How could the poor button know which of the slots in your app to call if you don't tell it?So the main purpose of it is how to serve a lot of buttons.
If you don't connect -some- slot to -every- button's clicked() signal, your slots will only be called for the buttons where you did make a connection.
If you make a single slot and connect it to all of the buttons' clicked() signals, you can use the QObject::sender() method inside the slot to give you the pointer to the button instance that invoked the slot, and you can use that pointer to find out the button's properties (like name).
Edit: high_flyer's QSignalMapper might also work, but it is a bit hard to understand for a beginner.
Bookmarks