[Interest] QMacNativeWidget & memory management

Tim Blechmann tim at klingt.org
Wed Dec 11 11:46:00 CET 2013

> 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. Other events, such as expose or update events, will be also
> forwarded to Qt since they come form the NSView hierarchy update
> mechanism. However, the NSView, and hence Qt, will not receive
> NSWindow notifications, such as minimization, fullscreen mode, etc.
> (it does in pure Qt because we manage both the NSView and its
> NSWindow). And, obviously, pure Cocoa events and notifications need
> to be forwarded to Qt as well. We admit the documentation could be a
> bit more complete in this area.

thanks a lot! also i wonder: is the parent NSView informed if the
QMacNativeWidget is resized? in my use case i have a QMacNativeWidget,
containing a layout. i suppose the layout resizes it depending on its
content. but the parent NSView is not resizes accordingly, right? i
suppose this is my responsibility to do this?

oh and yes, any improvement in the documentation on how to use
QMacNativeWidget would be more than welcome :)

thanks a lot,

More information about the Interest mailing list