Qt Designer generated UIs support a feature called Automatic Connections. This will automatically connect signals and slots based on a given naming convention. This is
on_{Sender Object Name}_{Signal}
Every mehtod with this signature and matching Widget/Signal in the UI file will automatically be connected as a slot.
This mechanism is hardcoded in Qt, you cannot change it.
However, you can manually connect signals/slots in the Designer:
- either go to the signal/slot view (shortcut F4) and drag/drop the objects to select the singals and slots
- or open the Signal/Slot editor (usually in the lower right area) and add a connection by entering sender, signal, receiver and slot
With these methods, you can choose a slot with any name
Update:
When using a custom widget with your own signals/slots that are not known to QtDesigner, you can add them in Signal/Slot drag and drop method mentioned above. Simply click on the "Change..." button in the popup editor, and add the signature of your signal/slot.
You have to make sure that the concrete Class instantiating the UI actually has these signals/slots.
This is only possible on the root-widget of the UI or placeholder widgets