- Qt 6.11
- Qt WebEngine
- C++ Classes
- QtWebEngineCore
- QWebEngineFrame
- Qt 6.11.1 Reference Documentation

# QWebEngineFrame Class

The QWebEngineFrame class gives information about and control over a page frame. More...

Header: | `#include <QWebEngineFrame>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)` `target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)`
qmake: | `QT += webenginecore`
Since: | Qt 6.8
In QML: | webEngineFrame

## Detailed Description

A web engine frame represents a single frame within a web page, such as those created by `<frame>` or `<iframe>` HTML elements. An active QWebEnginePage has one or more frames arranged in a tree structure. The top-level frame, the root of this tree, can be accessed through the mainFrame() method, and children() provides a frame's direct descendants.

A frame's lifetime is, at most, as long as the QWebEnginePage object that produced it. However, frames may be created and deleted spontaneously and dynamically, for example through navigation and script execution. Because of this, many QWebEngineFrame methods return optional values, which will be `std::nullopt` if the frame no longer exists.