> This is on OS X, so I could also use a native API like KVO on [NSApp windows] > but that doesn't seem to work as I'd like, possibly because that's not an > observable property and undoubtedly also because not all WIds are NSWindows.
On OS X with Qt 5, WId's are NSViews. You can get the NSWindow from [NSView window]. And, of course, Qt doesn't create the NSWindow until the top-level widget is shown for the first time, but calling winID() will cause Qt to create an NSView even for non-top-level widgets. We call internalWinId() and we're prepared to get back nullptr. internalWinId() is undocumented, but a public API used lots of places in Qt code, so it's probably not going anywhere soon. -John Weeks WaveMetrics, Inc. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest