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

QApplication.setEventFilter crashes when UI has a QWebEngineView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.1
    • PySide
    • None

    Description

      Installing a global event filter on the QApplication works as long as the UI doesn't have a QWebEngineView.

      Minimal Example:

       

      import sys
      from PySide2 import QtCore, QtWidgets
      from PySide2.QtWebEngineWidgets import QWebEngineView
      
      class GlobalEventFilter(QtCore.QObject):
          def eventFilter(self, watched: QtCore.QObject, event: QtCore.QEvent):
             print(type(watched), event.type())
             return super().eventFilter(watched, event)
      
      if __name__ == '__main__':
          app = QtWidgets.QApplication(sys.argv)
          global_filter = GlobalEventFilter()
          app.installEventFilter(global_filter)
          # window = QtWidgets.QTextEdit()  # works fine with any QWidget
          window = QWebEngineView()         # crashes: Received signal 11 SEGV_MAPERR
          window.show()
          sys.exit(app.exec_())
      

       

       

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            pragy Pragy Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes