about harmonia

Josh Stern josh_usenet at phadd.net
Tue Oct 10 07:18:22 PDT 2006

On Tue, 10 Oct 2006 11:45:30 +0300, Kristian wrote:

> On Tue, 10 Oct 2006 06:17:06 +0300, Josh Stern <josh_usenet at phadd.net>  
> wrote:
>> On Sat, 07 Oct 2006 12:28:42 +0300, Kristian wrote:
>>> On Sat, 07 Oct 2006 04:38:39 +0300, Hasan Aljudy  
>>> <hasan.aljudy at gmail.com>
>>> wrote:
>>>> ns wrote:
>>>>> The harmonia wiki does not seem to have much content.
>>>>>  http://harmonia.terrainformatica.com/pmwiki.php/Harmonia
>>>> oh btw, this is the project's home page, it still has contents.
>>>> http://harmonia.terrainformatica.com/
>>> Looks promising. :) I like very much the sinking/bubbling event
>>> dispatching. IMHO, that's the correct order to deliver event messages.
>>> E.g. when the mouse is clicked, the topmost widget (the application
>>> object, actually) will get the event message first, and finally the
>>> bottommost widget.
>>> For instance, Qt sends the event message directly to the bottommost
>>> widget. If you like to catch the message, then you have to create an  
>>> event
>>> handler and install it for the widget. Not good.
>> Hi, I'm not familiar with Harmonia, but it sounds like you are implying
>> some limitations for Qt that are not really there.   Have a look at the
>> docs for QCoreApplication::notify()
>> http://doc.trolltech.com/4.2/qcoreapplication.html#notify
>> and QObject::installEventFilter()
>> http://doc.trolltech.com/4.2/qobject.html#installEventFilter
>> and see if you agree.
> Well, I don't know if it's a limitation, but a feature. And yes, you can  
> catch events by the 'QCoreApplication::notify()' function also. Please  
> tell me if I am wrong, but one cannot catch events of another widget  
> without using 'QCoreApplication::notify()' or event handlers.

Yes, I think "cannot" is wrong.   If the the most spatially specific
widget doesn't want to handle the event in the general case, the event 
is normally propaged to the spatial parent (this is traditional for all
X11 toolkits based on the way Xlib itself works, and Qt's notify follows
that), but if you want to intervene in a special case then Qt allows you
to install an EventFilter. That's what my two links above are describing -
first how the general case is handled, and then how EventFilters work.  

More information about the Digitalmars-d-dwt mailing list