FullScreenRequest QML Type

WebEngineView::fullScreenRequested() 信号的实用程序类型。更多

Import Statement: import QtWebEngine
Since: QtWebEngine 1.1
In C++: QWebEngineFullScreenRequest

属性

方法

详细说明

另请参见 WebEngineView::fullScreenRequested().

属性文档

origin : url [read-only]

发出全屏请求的网页的 URL。


toggleOn : bool [read-only]

如果应用程序应开启全屏模式,则返回true ,否则返回false

另请参阅 accept().


方法文档

void accept()

调用此方法接受全屏请求。它将WebEngineView::isFullScreen 属性设置为等于toggleOn

ApplicationWindow {
    id: window
    WebEngineView {
        onFullScreenRequested: function(request) {
            if (request.toggleOn)
                window.showFullScreen()
            else
                window.showNormal()
            request.accept()
        }
    }
}

另请参阅 toggleOn


void reject()

拒绝全屏请求。


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