QMainWindow::QMainWindow ( QWidget * parent = 0, Qt::WindowFlags flags = 0 )
Constructs a QMainWindow with the given parent and the specified widget flags.
QMainWindow sets the Qt::Window flag itself, and will hence always be created as a top-level widget.