ApplicationManagerWindow QML Type

The window root item required in a multi-process environment. More...

Import Statement: import QtApplicationManager.Application 2.0

Signals

Methods

Detailed Description

This QML item can be used as the root item in your QML application. In doing so, you enable your application to be usable in both single-process (EGL fullscreen, desktop) and multi-process (Wayland) mode. It inherits from Window in multi-process and from Item in single-process mode. In contrast to a Window it is visible by default. Additional details can be found in the section about the root element.

The QML import for this item is

import QtApplicationManager.Application 2.0

After importing, you can instantiate the QML item like so:

import QtQuick 2.0
import QtApplicationManager.Application 2.0

ApplicationManagerWindow {
    Text {
        text: ApplicationInterface.applicationId
    }
}

In order to make your applications easily runnable outside of the application manager, even though you are using a ApplicationManagerWindow as a root item, you can simply provide this little dummy import to your application.

  1. Pick a base dir and create a QtApplicationManager.Application directory in it
  2. Add a file named qmldir there, consisting of the single line ApplicationManagerWindow 2.0 ApplicationManagerWindow.qml
  3. Add a second file named ApplicationManagerWindow.qml, with the following content
    import QtQuick 2.0
    
    Item {
        width: 1280   // use your screen width here
        height: 600   // use your screen height here
    
        function close() {}
        function showFullScreen() {}
        function showMaximized() {}
        function showNormal() {}
    }

Now you can run your appication within qmlscene (or qml) with e.g. qmlscene -I <path to base dir>

Signal Documentation

windowPropertyChanged(string name, var value)

Reports a change of this application window's property identified by name to the given value.

Note: The corresponding handler is onWindowPropertyChanged.

See also setWindowProperty.


Method Documentation

void setWindowProperty(string name, var &value)

Sets this application window's shared property identified by name to the given value.

These properties are shared between the System UI and the client applications: in single-process mode simply via a QVariantMap; in multi-process mode via Qt's extended surface Wayland extension. Changes from the client side are signalled via windowPropertyChanged.

See WindowManager for the server side API.

Note: When listening to property changes of Wayland clients on the System UI side, be aware of the asynchronous nature of the underlying Wayland protocol.

See also windowProperty, windowProperties, and windowPropertyChanged.


object windowProperties()

Returns an object containing all shared properties of this application window.

See also setWindowProperty.


var windowProperty(string name)

Returns the value of this application window's shared property identified by name.

See also setWindowProperty.


© 2021 The Qt Company Ltd. 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.