The platform abstraction works differently in Qt5, e.g. only top level windows have a native handle now as far as I know.

The mechanism of QWindow::fromWinId() was primarily designed to embed windows created by other processes (so called foreign windows), which usually have their own event handling (different application, different event loop).

Since this is all pretty low level you might want to check with the Qt development list.

Cheers,
_