`signal.connect(somthing slot)` means that make a connection between signal & slot. `signal.emit(object)` means that to emit the connected signal. Because you have connected textActivated(signal) with lineEdit.setText(slot), so, if you set the currentText for object when it is emitted, the setText catch the object.If you connect the signal to. I have a number of different signals connected to one slot. Is there any disconnect function that can be used to disconnect everything connected to a specific slot? For example: @QObject::connect(object1, SIGNAL(a), receiver, SLOT(slot)); QObject::con. Create a list of window names that don't have (and don't require) the slot B connection, and simply do an if/else check on those names making it only attempt to windows that aren't contained in that list. The list of windows not needing the connection.should. be smaller than the list of windows needing it.
Quite a frequent problem when working with signals with slots in Qt5, according to my observations on the forum, is the connection of slots in the syntax on the pointers to signals having an overload of the signature. The same applies to slots that have an overload.
Let's take a test class that has overloaded signals.
Here there is a signal, with an overload of the signature. Connect this signal will also be to the slots that are declared in the Widget class, and which also have an overload of the signature.
Within Qt4, everything was solved quite simply by specifying the signature of the signal and the slot in the SIGNAL and SLOT macros.
But in Qt5, when writing in the new syntax of signals and slots, there are some problems. Because you need to make the static_cast of the method signature.
By the way, the new syntax also allows you to connect signals to slots with a smaller signature, as it was in Qt4.
And now a stumbling block. Why use the new syntax of signals and slots? I still hear this question from time to time. Especially when people see such terrible castes of signatures.
In general, for me this is enough, but for you?