Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Qt webengineview Web page requestfullscreen invalid
Forum Updated to NodeBB v4.3 + New Features

Qt webengineview Web page requestfullscreen invalid

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 357 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cxtan
    wrote on 29 Sept 2022, 09:41 last edited by
    #1

    The Qt webengineview module will fail to request full screen pages in the following operations

    1. Click the input tab to select the file

    2. Through element.RequestFullscreen requests full screen operation, which will fai

    <html>
    <head>
        <script>
            //fullscreen
            function requestFullScreen(element) {
                if (element.requestFullscreen) {
                    element.requestFullscreen()
                } else if (element.mozRequestFullScreen) {
                    element.mozRequestFullScreen()
                } else if (element.msRequestFullscreen) {
                    element.msRequestFullscreen()
                } else if (element.webkitRequestFullscreen) {
                    element.webkitRequestFullScreen()
                }
            }
    
            //is fullscreen
            function IsFull() {
                var fullscreenElement =
                    document.fullscreenElement
                    || document.mozFullscreenElement
                    || document.webkitFullscreenElement;
                var fullscreenEnabled =
                    document.fullscreenEnabled
                    || document.mozFullscreenEnabled
                    || document.webkitFullscreenEnabled;
                if (fullscreenElement == null) {
                    return false;
                } else {
                    return true;
                }
            }
    
            //exit fullscreen
            function exitFull() {
                if (document.exitFullscreen) {
                    document.exitFullscreen()
                } else if (document.msExitFullscreen) {
                    document.msExitFullscreen()
                } else if (document.mozCancelFullScreen) {
                    document.mozCancelFullScreen()
                } else if (document.webkitExitFullscreen) {
                    document.webkitExitFullscreen()
                }
            }
    
            function clickFull(element){
                if(IsFull()){
                    exitFull()
                }else{
                    requestFullScreen(element)
                }
            }
        </script>
    </head>
    <body>
        <input type="file"/>
        <div style="width: 300px;height: 300px; background-color:black;" onclick="clickFull(this)"></div>
    </body>
    </html>
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      steno
      wrote on 3 Oct 2022, 16:25 last edited by
      #2

      Did you take a look at this example videoplayer? It appears the widget has to listen to the QWebEnginePage::fullScreenRequested signal.

      1 Reply Last reply
      0

      1/2

      29 Sept 2022, 09:41

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved