[Qt-interest] resizing window signal
Bo Thorsen
bo at fioniasoftware.dk
Tue Mar 29 09:51:23 CEST 2011
Den 28-03-2011 12:35, Atlant Schmidt skrev:
> All:
>
>> It's not a signal, it's an event you've got to reimplement
>
> Which of course begs the question:
>
> Why **ISN’T** it a signal?
There is a clear conceptual difference between signals and events in Qt.
An event has a single specific receiver. A signal can have any number of
receivers, including 0. Signals are used when there could be no
interested listeners.
There is a variation on this "single receiver" pattern in handling of
some of the gui events. These will pass on to the parent, if not
accepted. But the point still is that as soon as the event is accepted,
it's done.
Runtime speed is not the main driver of what should be an event and what
should be a signal. The conceptual difference is. To me this is a lot
more important. Keeping tight and precise concepts is what makes a
library great over many years.
For anyone who would like to listen on a signal, just install an event
handler, as Scott said.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-interest-old
mailing list