John Weeks wrote:
>> That's what I was really asking about: how
>> to get notified each time something is created that has a WId.
>
> Which is complicated by Qt's insistence on creating the platform-specific
> thing (wID as NSView, HWND, etc.) only when the QWidget becomes visible.
Indeed. But it seems it *is* possible to be notified when the widget (finally)
does become visible using something like
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowChangedOcclusionState:)
name:NSWindowDidChangeOcclusionStateNotification object:nil];
this will give you the NSWindow* instance that just had a change in occlusion
state (e.g. it was just mapped for the 1st time); chances are good that that
window's contentView is the QNSView corresponding to a WId.
Cf. https://git.reviewboard.kde.org/r/126291/
R.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest