<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qwebenginefullscreenrequest.cpp --> <title>QWebEngineFullScreenRequest Class | Qt WebEngine 5.11</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtwebengine-index.html">Qt WebEngine</a></td><td ><a href="qtwebengine-modules.html">C++ Classes</a></td><td >QWebEngineFullScreenRequest</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#properties">Properties</a></li> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QWebEngineFullScreenRequest Class</h1> <!-- $$$QWebEngineFullScreenRequest-brief --> <p>The <a href="qwebenginefullscreenrequest.html">QWebEngineFullScreenRequest</a> class enables accepting or rejecting requests for entering and exiting the fullscreen mode. <a href="#details">More...</a></p> <!-- @@@QWebEngineFullScreenRequest --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QWebEngineFullScreenRequest></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += webenginewidgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.6</td></tr></table></div><ul> <li><a href="qwebenginefullscreenrequest-members.html">List of all members, including inherited members</a></li> </ul> <a name="properties"></a> <h2 id="properties">Properties</h2> <ul> <li class="fn"><b><a href="qwebenginefullscreenrequest.html#origin-prop">origin</a></b> : const QUrl</li> <li class="fn"><b><a href="qwebenginefullscreenrequest.html#toggleOn-prop">toggleOn</a></b> : const bool</li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebenginefullscreenrequest.html#accept">accept</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const QUrl &</td><td class="memItemRight bottomAlign"><b><a href="qwebenginefullscreenrequest.html#origin">origin</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebenginefullscreenrequest.html#reject">reject</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebenginefullscreenrequest.html#toggleOn">toggleOn</a></b>() const</td></tr> </table></div> <a name="details"></a> <!-- $$$QWebEngineFullScreenRequest-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qwebenginefullscreenrequest.html">QWebEngineFullScreenRequest</a> class enables accepting or rejecting requests for entering and exiting the fullscreen mode.</p> <p>To allow elements such as videos to be shown in the fullscreen mode, applications must set <a href="qwebenginesettings.html#WebAttribute-enum">QWebEngineSettings::FullScreenSupportEnabled</a> and connect to <a href="qwebenginepage.html#fullScreenRequested">QWebEnginePage::fullScreenRequested</a>, which takes a <a href="qwebenginefullscreenrequest.html">QWebEngineFullScreenRequest</a> instance as an argument.</p> <p>If an element of a web page requests to be shown in the fullscreen mode, <a href="qwebenginepage.html#fullScreenRequested">QWebEnginePage::fullScreenRequested</a> will be emitted with an <a href="qwebenginefullscreenrequest.html">QWebEngineFullScreenRequest</a> instance as an argument where <a href="qwebenginefullscreenrequest.html#toggleOn">toggleOn</a>() returns <code>true</code>. The signal handler needs to then either call <a href="qwebenginefullscreenrequest.html#accept">accept</a>() or <a href="qwebenginefullscreenrequest.html#reject">reject</a>().</p> <p>If the request to enter the fullscreen mode is accepted, the element requesting fullscreen mode will fill the viewport, but it is up to the application to make the view fullscreen or to move the page to a view that is in the fullscreen mode.</p> <p>Likewise, a <a href="qwebenginepage.html#fullScreenRequested">QWebEnginePage::fullScreenRequested</a> will be emitted when the user wants to leave the full screen mode (that is, through the <a href="qwebenginepage.html#WebAction-enum">QWebEnginePage::ExitFullScreen</a> context menu action). In this case, <a href="qwebenginefullscreenrequest.html#toggleOn">toggleOn</a>() will return <code>false</code>, and the signal handler again needs to <a href="qwebenginefullscreenrequest.html#accept">accept</a>() or <a href="qwebenginefullscreenrequest.html#reject">reject</a>() the request. If it is accepted, the applicaton needs to make sure that the global window state is restored.</p> </div> <!-- @@@QWebEngineFullScreenRequest --> <div class="prop"> <h2>Property Documentation</h2> <!-- $$$origin-prop$$$origin --> <h3 class="fn" id="origin-prop"><a name="origin-prop"></a><span class="name">origin</span> : const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span></h3> <p>This property holds the URL to be opened in the fullscreen mode.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> const QUrl &</td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwebenginefullscreenrequest.html#origin">origin</a></b></span>() const</td></tr> </table></div> <!-- @@@origin --> <!-- $$$toggleOn-prop$$$toggleOn --> <h3 class="fn" id="toggleOn-prop"><a name="toggleOn-prop"></a><span class="name">toggleOn</span> : const <span class="type">bool</span></h3> <p>This property holds whether the web page has issued a request to enter fullscreen mode.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwebenginefullscreenrequest.html#toggleOn">toggleOn</a></b></span>() const</td></tr> </table></div> <!-- @@@toggleOn --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$accept[overload1]$$$accept --> <h3 class="fn" id="accept"><a name="accept"></a><span class="type">void</span> QWebEngineFullScreenRequest::<span class="name">accept</span>()</h3> <p>Accepts the request to enter or exit the fullscreen mode.</p> <p><b>Note: </b>This function can be invoked via the meta-object system and from QML. See <a href="../qtcore/qobject.html#Q_INVOKABLE">Q_INVOKABLE</a>.</p> <!-- @@@accept --> <!-- $$$origin --> <h3 class="fn" id="origin"><a name="origin"></a>const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> &QWebEngineFullScreenRequest::<span class="name">origin</span>() const</h3> <p>Returns the URL to be opened in the fullscreen mode.</p> <p><b>Note:</b> Getter function for property <a href="qwebenginefullscreenrequest.html#origin-prop">origin</a>. </p><!-- @@@origin --> <!-- $$$reject[overload1]$$$reject --> <h3 class="fn" id="reject"><a name="reject"></a><span class="type">void</span> QWebEngineFullScreenRequest::<span class="name">reject</span>()</h3> <p>Rejects a request to enter or exit the fullscreen mode.</p> <p><b>Note: </b>This function can be invoked via the meta-object system and from QML. See <a href="../qtcore/qobject.html#Q_INVOKABLE">Q_INVOKABLE</a>.</p> <!-- @@@reject --> <!-- $$$toggleOn --> <h3 class="fn" id="toggleOn"><a name="toggleOn"></a><span class="type">bool</span> QWebEngineFullScreenRequest::<span class="name">toggleOn</span>() const</h3> <p>Returns <code>true</code> if the web page has issued a request to enter the fullscreen mode, otherwise returns <code>false</code>.</p> <p><b>Note:</b> Getter function for property <a href="qwebenginefullscreenrequest.html#toggleOn-prop">toggleOn</a>. </p><!-- @@@toggleOn --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> 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. </p> </div> </body> </html>