2016-12-17

QtQuick.Window allows us to scope window behavior using the "flags" property with Qt::WindowFlags. From the Qt docs:

Window flags are a combination of a type (e.g. Qt::Dialog) and zero or more hints to the window system (e.g. Qt::FramelessWindowHint).

If the widget had type Qt::Widget or Qt::SubWindow and becomes a window (Qt::Window, Qt::Dialog, etc.), it is put at position (0, 0) on the desktop. If the widget is a window and becomes a Qt::Widget or Qt::SubWindow, it is put at position (0, 0) relative to its parent widget.

Examples exist of QML uses of Qt::WindowFlags.

Unfortunately, all the available examples create system windows in that the windows are visible to the system window manager. The docs claim that non-system windows can also be implemented using the Qt::SubWindow flag but I have not been able to achieve this. Does anyone have a working example in QML?

See QMdiSubWindow for examples of it working in C.

Show more