First of all, thanks for this question. Until this time, I do not know about this function in Qt. I will spend some time realizing your solution and having the same problem: white frame.
After several tests, I try to update the window on the fly, and instead of white borders there are my own OS borders:

It looks like when call QWidget::createWindowContainer Qt gets the size of the whole window, display a QWidget (with a smaller size than the whole window) and fill the background with white.
I found a solution for this problem: check the Qt::FramelessWindowHint window check box for the child widget before you call createWindowContainer in the parent window.
this->setWindowFlags(Qt::FramelessWindowHint);
I could not reproduce the crash problem after resizing. I add a child widget to the layout and it works great.
You can look at the source in the Git hub .
If this does not solve your failure problem, indicate the source of the problem.
NOTE: in the example on GitHub, I start a child project, read winId from the debug output, change the parent source and start the parent project.
source share