Screen QML Type

Contains QML items to be shown on a specific screen. 更多...

导入语句: import QtQuickUltralite.Layers .
Since: Qt Quick Ultralite 1.7
继承:

Item

特性

详细描述

All QML items that are to be shown on a screen have to be contained in a Screen item. One or muliple Screen items can be instantiated within an 应用程序 项。

用法范例:

Screen {
    outputDevice: "Primary screen"
    backgroundColor: "black"
    ItemLayer {
        anchors.fill: parent
        Rectangle {
            anchors.fill: parent
            color: "red"
        }
    }
}
						

注意: This type is specific to Qt Quick Ultralite. See also the compatibility 页面。

另请参阅 应用程序 .

特性文档编制

backgroundColor : color

Background color to be used for this screen.


outputDevice : string

Name of the screen to be used.

This is the name of the screen that should be used to display the items. It has to match the identifier defined by the platform screens.

The first screen with a matching name is used for display. If this property is empty or skipped the screen are matched by their order in the 应用程序 item to the next unused screen from the platform.

移植指南 on how to setup multiple screens.

另请参阅 Qul::PlatformInterface::Screen .