WindowItem QML Type

An Item that renders a given WindowObject. More...

Import Statement: import QtApplicationManager.SystemUI 2.0



Detailed Description

In order to render a WindowObject inside the System-UI, you must specify where and how it should be done. This is achieved by placing a WindowItem in the scene, which is a regular QML Item, and assigning the desired WindowObject to it.

The WindowObject will then be rendered in the System-UI scene according to the WindowItem's geometry, opacity, visibility, transformations, etc.

The relationship between WindowObjects and WindowItems is similar to the one between image files and Image items. The former is the content and the latter defines how it's rendered in a QML scene.

It's possible to assign the same WindowObject to multiple WindowItems, which will result in it being rendered multiple times.

The implicit size of a WindowItem is the size of the WindowObject it is displaying.

See also WindowObject.

Property Documentation

objectFollowsItemSize : bool

If true, WindowItem will resize the WindowObject it's displaying to match its own size. If false, resizing the WindowItem will have no effect on the size of the WindowObject being displayed. This property is true by default.

You should to set it to false when you want the WindowItem size to be determined by the WindowObject's size. In this case, in addition to setting this property to false, either don't specify a width and height (as the item's implicit size is its WindowObject's size) or explicitly set it to match WindowObject's size.

See also WindowObject::resize.

primary : bool

Returns whether this is the primary view of the set WindowObject. The primary WindowItem will be the one sending input events and defining the size of the WindowObject.

A WindowObject can have only one primary WindowItem. If multiple WindowItems are rendering the same WindowObject, making one primary will automatically turn the primary property of all others to false.

The first WindowItem to display a window is by default the primary one.

See also makePrimary.

window : WindowObject

The window surface to be displayed.

Method Documentation

void makePrimary()

Make it the primary WindowItem of the window it is displaying.

See also primary.

© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.