I\'d like to place QMainWindow instance inside another QWidget (for example centralWidget of another QMainWindow).
I\'m wondering why it doesn\'t work ? QMainWindow
Having the same problem, I found the solution here.
QMainWindow sets its window type to Qt::Window so that it will be in an independent window even if it has a parent (you can confirm this by calling show() on your QMainWindow, and you will see it in its own window). Try adding the line
window->setWindowFlags(Qt::Widget);
after you construct the QMainWindow.