Primary and Secondary Windows¶
Any
QWidget
that 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
QWidget
that has a parent can become a window by setting theWindow
flag. 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.The
QMainWindow
class sets theWindow
flag in its constructor, as it is designed to be used as a window and provides facilities that are not wanted for child widgets.