[Qt-interest] Difference between an Event and signal in QT
David Boddie
david.boddie at nokia.com
Tue Nov 24 20:33:39 CET 2009
Gordon Schumacher wrote:
> Murali Mohan wrote:
>> I am a newbie to Qt.
>> I would like to know the difference between a Qt event and a Qt signal.
>> It would be great of someone can provide some info along with some
>> simple samples.
>
> I don't recall the exact line, but it goes something like "Events are
> for structural notification, and signals are for semantic information".
> That is, events say things like "someone pushed or released a mouse
> button", and signals say "Button XYZ was clicked".
Perhaps it also helps to say that each signal is emitted by a well-defined
Qt component (a button emits a clicked signal) and should have a well-
defined recipient (a slot is called to handle the click).
Events, on the other hand, often originate from outside Qt (a key press
event has arrived) and can be delivered to different recipients depending
on the way they handle events (handling cursor keys, for example, but
ignoring other key presses).
David
--
David Boddie
Senior Technical Writer
Nokia, Qt Development Frameworks
More information about the Qt-interest-old
mailing list