WaylandQuickItem QML Type

Provides a Qt Quick item that represents a WaylandView . 更多...

import 語句: import QtWayland.Compositor 1.0
Since: Qt 5.8
繼承者: ShellSurfaceItem

特性

信號

方法

詳細描述

Qt Quick-based Wayland compositors can use this type to display a client's contents on an output device. It passes user input to the client.

特性文檔編製

compositor : WaylandCompositor

This property holds the compositor for the surface rendered by this WaylandQuickItem .

focusOnClick : bool

This property specifies whether the WaylandQuickItem should take focus when it is clicked or touched.

默認為 true .

origin : enum

This property holds the origin of the QWaylandQuickItem .

paintEnabled : bool

Returns true if the item is hidden, though the texture is still updated. As opposed to hiding the item by setting visible to false , setting this property to false will not prevent mouse or keyboard input from reaching item.

sizeFollowsSurface : bool

This property specifies whether the size of the item should always match the size of its surface.

默認為 true .

subsurfaceHandler : object

This property provides a way to override the default subsurface behavior.

By default, Qt will create a new SurfaceItem as a child of this item, and maintain the correct position.

To override the default, assign a handler object to this property. The handler should implement a handleSubsurfaceAdded( WaylandSurface ) function.

ShellSurfaceItem {
    subsurfaceHandler: QtObject {
    function handleSubsurfaceAdded(child) {
      //create custom surface item, and connect the subsurfacePositionChanged signal
    }
}
											

此特性的默認值為 null .

surface : WaylandSurface

This property holds the surface rendered by this WaylandQuickItem .


信號文檔編製

void surfaceDestroyed ()

This signal is emitted when the client has destroyed the wl_surface associated with the WaylandQuickItem . The handler for this signal is expected to either destroy the WaylandQuickItem immediately or start a close animation and then destroy the Item.

If an animation is started, bufferLocked should be set to ensure the item keeps its content until the animation finishes

另請參閱 bufferLocked.


方法文檔編製

setPrimary ()

Makes this WaylandQuickItem the primary view for the surface.