faq
flatforty
contribute
subscribe
configure
search
rdf
main
parent
thread
|
Re: KDE & Companies: Ask Trolltech Anything
by Guillaume Laurent on Sunday 08/Jul/2001, @06:45
|
One obvious answer is performance reasons, the other is simply that event handling and signals are actually quite different in purpose.
Signals are used to "communicate" between widgets, typically when a widget needs to report about a state change. Events are things which the widget may want to handle itself.
Try figuring out how it would be if QEvents were replaced by signals or if signals were replaced by QEvent. It just won't work. |
|
|
The Fine Print: The following comments
are owned by whomever posted them.
( Reply )
|
Re: KDE & Companies: Ask Trolltech Anything
by Justin on Sunday 08/Jul/2001, @18:30
|
Well, signals/slots don't have to be used for widgets. That's the difference I pointed out above.
Take, for example, my project called Psi (it's a Jabber client. see: http://www.affinix.com/~justin/programs/psi/). The backend classes to handle the XML, networking, and communication to the main program all use signal/slots. There is no widget in sight. In fact, the first incarnations of Psi were all console based (requiring Qt of course, because of the signal/slots and QSocket/QXml/QString,etc). QEvents are window system notifications. Signals/slots are a really cool way for your classes to interact within your program.
-Justin
|
[
Reply To This | View ]
|
The Fine Print: The previous
comments are owned by whomever posted them.
( Reply )
|
|