#include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); // create QMainWindow and QMdiArea QMainWindow* mainWnd = new QMainWindow(); QMdiArea* mdi = new QMdiArea(mainWnd); mainWnd->setCentralWidget(mdi); mainWnd->show(); app.setActiveWindow(mainWnd); // when desktop size is 1920x1200; // create one QMdiSubWindow // This can be resize properly QMdiSubWindow* subWnd1 = mdi->addSubWindow(new QGLWidget()); subWnd1->resize(1920, 1200); subWnd1->show(); // create another one // This can't be resize QMdiSubWindow* subWnd2 = mdi->addSubWindow(new QGLWidget()); subWnd2->resize(1920, 1200); subWnd2->show(); return app.exec(); }