Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1768

QWebEngineFullScreenRequest of PySide6 cannot work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 6.2.0, 6.2.1, 6.2.2
    • PySide
    • None
    • Linux/Wayland, Linux/X11, Windows
    • ec07828d77 (pyside/pyside-setup/dev) 31139d5acc (pyside/pyside-setup/6.2) ec07828d77 (pyside/tqtc-pyside-setup/tqtc/dev) 31139d5acc (pyside/pyside-setup/6.2.3)

    Description

      After QWebEnginePage (with FullScreenSupportEnabled) sends a signal fullScreenRequested to the customized function self.fullscreen, self.fullscreen can receive the signal and takes a QWebEngineFullScreenRequest instance, but all functions of PySide6 class QWebEngineFullScreenRequest can't work normally, and they will cause a crash of the browser.

      You may reproduce the bug through Simple Browser Example with the following code.

      # The two lines are added to the end of the function.
      def __init__(self):
          ...
          self.webEngineView.settings().setAttribute(QWebEngineSettings.FullScreenSupportEnabled, True)
          self.webEngineView.page().fullScreenRequested.connect(self.fullscreen)
      
      # The following function handles the request for fullscreen.
      def fullscreen(self, request):
          request.accept()
          if request.toggleOn() is True:
              self.webEngineView.setWindowFlags(Qt.Window)
              self.webEngineView.showFullScreen()
          else:
              self.webEngineView.setWindowFlags(Qt.Widget)
              self.webEngineView.showNormal()
      

      When self.fullscreen is trying to handle its first line "request.accept()"(I confirmed this by inserting a line like "print('something')" after this line), the browser crashes. It seems that PySide6 class QWebEngineFullScreenRequest can't work normally, so I report it as a bug related to QWebEngineFullScreenRequest.

      I tested PySide6's versions 6.2.2.1, 6.2.2, 6.2.1 and 6.2.0. All of them have the bug. I didn't test earlier versions. I tested on Windows and Linux. The bug exists on both of them and there is no any error information when a crash of the program occurs. However, on PyQt6 QWebEngineFullScreenRequest works normally. It seems that the bug is related to PySide6.

      Thanks for your reading and attention!

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              old_beginner Y. Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes