[Development] Proposal to change connectSlotsByName behavior

Benjamin TERRIER b.terrier at gmail.com
Fri Dec 4 17:34:41 CET 2015

2015-12-04 10:30 GMT+01:00 Marc Mutz <marc.mutz at kdab.com>:
> This is precisely the reason why connectSlotsByName is a bad idea in the first
> place; changing the name of a widget breaks connections (at runtime, not at
> compile time as with QObject::connect()).
> Just don't use it. Then we can let the function r.i.p. come Qt 6... :)

As many seems to think connectSlotsByName should not be used, maybe it
should be, as André Somers said, deprecated.

However it is used by the designer plugin within Qt Creator as it uses
the fact that uic will generate a call to connectsSlotByName to
automatically generates slots when the user clicks on "Go to slots.."
in the context menu.
This means that every widget class that has a ui file will call
There is still an open bug report asking to make the call optional



More information about the Development mailing list