PDA

View Full Version : learning all thing about signals and slots



Alex22
4th December 2015, 09:14
Hi

I want to know and learn all thing about signals ans slots and connecting of them. are there any references that explain completely. Thanks for any help.

Qiieha
4th December 2015, 09:27
http://doc.qt.io/qt-5/signalsandslots.html

Alex22
4th December 2015, 10:13
http://doc.qt.io/qt-5/signalsandslots.html

Qiieha, thanks but in this Doc., for example there is no explanation about connecting a signal to another signal that we could connect a signal to another signal. are there other references that have more examples and complete explanation?

Vikram.Saralaya
4th December 2015, 10:43
You cannot connect a signal to another signal.. you can may be check QSignalMapper documentation..

Alex22
4th December 2015, 10:57
You cannot connect a signal to another signal.. you can may be check QSignalMapper documentation..

We could. for example:


connect(lineEdit, SIGNAL(textChanged(const QString &)),
this, SIGNAL(updateRecord(const QString &)));

yeye_olive
4th December 2015, 10:58
You cannot connect a signal to another signal.. you can may be check QSignalMapper documentation..
Yes you can. This causes the second signal to be emitted whenever the first one is, and is in fact quite useful to simulate "exporting" a signal from a private object.

Vikram.Saralaya
4th December 2015, 11:55
@yeye_olive I never encountered a case for that! Thanks for that info.. might be useful someday :)
@Alex22 my bad sorry!