[Interest] QMacNativeWidget & memory management
Tim Blechmann
tim at klingt.org
Wed Dec 11 14:02:24 CET 2013
>> i see. there is one further point that i'm a bit confused with:
>> according to the QMacNativeWidget documentation, the user has to
>> take care of delivering events from Cocoa to the QMacNativeWidget.
>> however it seems that this is actually done internally, because in
>> the example the qt widgets react on mouse/keyboard events without
>> additional code in-between.
>
> QMacNativeWidget creates an NSView that you will insert in your view
> hierarchy. That NSView will receive mouse and keyboard events, like
> any other view, that will be forwarded to the QMacNativeWidget as Qt
> events.
actually, i do have one problem with mouse events in my use case:
i'm embedding a QMacNativeWidget inside an NSView* that i'm getting from
a host application.
depending on the host, there are cases, that the mouse events and the
drawn widget are way off: part of the Qt widgets are drawn outside of
parent view, and some mouse events appear in completely different places
(e.g. sometimes i have to click roughly 100 pixels below a button).
any idea, what could cause this (i'm more familiar with Qt than with cocoa)
thanks,
tim
More information about the Interest
mailing list