本页内容

CapturableWindow QML Value Type

CapturableWindow 类型用于获取可通过 `WindowCapture` 捕获的窗口的基本信息。更多内容...

Import Statement: import QtMultimedia
Since: Qt 6.6
In C++: QCapturableWindow

属性

详细说明

该类包含窗口信息的快照,但“isValid ”属性除外,该属性每次都会获取实际的窗口状态。

可以从 `Window` 隐式构造一个 `CapturableWindow` 实例。应用程序开发人员可以通过将一个 QML Window 传递给 `WindowCapture` 的“window”属性来利用此功能。请参阅以下示例。

Window {
    id: topWindow

    WindowCapture {
        window: topWindow
    }
}

另请参阅 WindowCapture 。

属性文档

description : string [read-only]

该属性存储了窗口的描述。在大多数情况下,它表示窗口标题。

isValid : string [read-only]

该属性用于标识窗口信息是否有效。

无效的窗口信息是指不存在的窗口,或者未指向任何特定窗口。

© 2026 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.