<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Exit full screen in WebEngineView QtQuick]]></title><description><![CDATA[<p dir="auto">Part of my QtQuick app will go fullscreen when the webpage requests it. I am able to successfully get into full screen when it is requested, however I seem to be unable to get out. I know I am doing something wrong. It seems to work initially and goes to my "else" and becomes fullscreen, but  when I click the fullscreen web button again it does not seem to run again and exit fullscreen.  Any help or guidance would be appreciated. The full code can be found here: <a href="https://gitlab.com/The3DmaN/media-server-connect" target="_blank" rel="noopener noreferrer nofollow ugc">https://gitlab.com/The3DmaN/media-server-connect</a></p>
<p dir="auto">mediaserverconnect.ui.qml</p>
<pre><code>WebEngineView {
        id: webview
        anchors.fill: parent
        settings.allowWindowActivationFromJavaScript: false
        settings.javascriptCanOpenWindows: true
        settings.javascriptEnabled: true
        settings.webGLEnabled: true
        settings.fullScreenSupportEnabled: true
        settings.showScrollBars: false
        url: "http://" + ipsettings.ip + ":" + ipsettings.port

        Connections {
            target: webview
            onFullScreenRequested: {
                if (webview.state == "FullScreen") {
                    webview.triggerWebAction(WebEngineView.ExitFullScreen)
                    window.showNormal()
                    toolBar.visible = true
                } else {
                    webview.state = "FullScreen"
                    window.showFullScreen()
                    toolBar.visible = false
                }
            }
        }
    }
</code></pre>
<p dir="auto">Other info: The webpage is an Emby server video page, and the fullscreen button gives off the below code (not my code)</p>
<pre><code>function() {
  playbackManager.toggleFullscreen(currentPlayer)
}
</code></pre>
]]></description><link>https://forum.qt.io/topic/121505/exit-full-screen-in-webengineview-qtquick</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 13:26:29 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/121505.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 06 Dec 2020 20:57:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Exit full screen in WebEngineView QtQuick on Thu, 10 Dec 2020 05:12:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bob64">@<bdi>Bob64</bdi></a> Thanks so much! I think missing request.accept() was the issue. I also swapped to request.toggleOn.</p>
<p dir="auto">All working now with:</p>
<pre><code>onFullScreenRequested: {
                if (request.toggleOn) {
                    window.showFullScreen()
                    toolBar.visible = false
                    request.accept()
   
                } else {
                    window.showNormal()
                    toolBar.visible = true
                    request.accept()
                }
            }
</code></pre>
]]></description><link>https://forum.qt.io/post/631775</link><guid isPermaLink="true">https://forum.qt.io/post/631775</guid><dc:creator><![CDATA[The3DmaN]]></dc:creator><pubDate>Thu, 10 Dec 2020 05:12:36 GMT</pubDate></item><item><title><![CDATA[Reply to Exit full screen in WebEngineView QtQuick on Wed, 09 Dec 2020 21:36:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/the3dman">@<bdi>The3DmaN</bdi></a> said in <a href="/post/631037">Exit full screen in WebEngineView QtQuick</a>:</p>
<blockquote>
<p dir="auto">fullScreenSupportEnabled</p>
</blockquote>
<p dir="auto">I haven't used this myself, but from looking at the documentation, perhaps you need to call <code>request.accept()</code> at the end of your <code>onFullScreenRequested</code> handler.</p>
<p dir="auto">Also, you could use the <code>request.toggleOn</code> property to query the mode rather than the string comparison with <code>webview.state</code> that you currently use.</p>
]]></description><link>https://forum.qt.io/post/631703</link><guid isPermaLink="true">https://forum.qt.io/post/631703</guid><dc:creator><![CDATA[Bob64]]></dc:creator><pubDate>Wed, 09 Dec 2020 21:36:52 GMT</pubDate></item></channel></rss>