Primary and Secondary Windows¶
QWidgetthat has no parent will become a window, and will on most platforms be listed in the desktop’s task bar. This is usually only wanted for one window in the application, the primary window .
In addition, a
QWidgetthat has a parent can become a window by setting the
Windowflag. Depending on the window management system such secondary windows are usually stacked on top of their respective parent window, and not have a task bar entry of their own.
QMainWindowclass sets the
Windowflag in its constructor, as it is designed to be used as a window and provides facilities that are not wanted for child widgets.