Wednesday, March 31, 2010

QT : Signal and Slot

http://en.wikipedia.org/wiki/Signals_and_slots
http://doc.trolltech.com/4.6/signalsandslots.html
http://caterpillar.onlyfun.net/Gossip/Qt4Gossip/CustomSignalSlot.html
http://en.wikipedia.org/wiki/Observer_pattern

Singal Slot is kind of Observer design pattern. You can connect the signal function of object A to the slot function to object B. This connection let A & B not know each other, but they still can get connected. When A emit the signal function, it further calls B slot function.

Following image shows that comboBox and spinBox signal connect to textEdit slot. So when valued changed, they also affects textEdit. It useful for GUI programming.




No comments:

Related Posts Plugin for WordPress, Blogger...