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. PySide2 - QtWebEngine dont display anything (blank screen inside QWebEngineView) / Ubuntu 22.04 Mate - kernel 5.15.0-46 - Python 3.10
Forum Updated to NodeBB v4.3 + New Features

PySide2 - QtWebEngine dont display anything (blank screen inside QWebEngineView) / Ubuntu 22.04 Mate - kernel 5.15.0-46 - Python 3.10

Scheduled Pinned Locked Moved Unsolved QtWebEngine
4 Posts 2 Posters 995 Views
  • 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
    cc1cc1
    wrote on last edited by
    #1

    Hi guys, i got an issue using QtWebEngine under linux => nothing appear into the QWebEngineView (working pretty well under Windows 10

    Here my config:
    Linux Ubuntu Mate 22.04
    Linux kernel 5.15.0-46
    Python 3.10
    PySide2 5.15.2.1 (also try with 5.13.2/5.13.1/5.13.0)

    Here the code:

    import sys
    import os
    from pathlib import Path
    
    from PySide2.QtWidgets import QApplication, QMainWindow
    
    from PySide2.QtCore import QFile
    
    from PySide2.QtUiTools import QUiLoader
    from PySide2.QtWebEngineWidgets import *
    
    class Trader(QMainWindow):
        def __init__(self, parent):
            super(Trader, self).__init__()
            self.parent = parent
    
            loader = QUiLoader()
    
            path = os.fspath(Path(__file__).resolve().parent / "form.ui")
            ui_file = QFile(path)
    
            ui_file.open(QFile.ReadOnly)
            self.ui = loader.load(ui_file, self)
    
            ui_file.close()
    
            self.web = QWebEngineView()
            print(self.web.load("https://www.google.fr"))
    
            self.ui.view_layout.addWidget(self.web)
    
            self.showMaximized()
    
    if __name__ == "__main__":
        app = QApplication([])
    
        widget = Trader(app)
    
        sys.exit(app.exec_())
    
    JonBJ 1 Reply Last reply
    0
    • C cc1cc1

      Hi guys, i got an issue using QtWebEngine under linux => nothing appear into the QWebEngineView (working pretty well under Windows 10

      Here my config:
      Linux Ubuntu Mate 22.04
      Linux kernel 5.15.0-46
      Python 3.10
      PySide2 5.15.2.1 (also try with 5.13.2/5.13.1/5.13.0)

      Here the code:

      import sys
      import os
      from pathlib import Path
      
      from PySide2.QtWidgets import QApplication, QMainWindow
      
      from PySide2.QtCore import QFile
      
      from PySide2.QtUiTools import QUiLoader
      from PySide2.QtWebEngineWidgets import *
      
      class Trader(QMainWindow):
          def __init__(self, parent):
              super(Trader, self).__init__()
              self.parent = parent
      
              loader = QUiLoader()
      
              path = os.fspath(Path(__file__).resolve().parent / "form.ui")
              ui_file = QFile(path)
      
              ui_file.open(QFile.ReadOnly)
              self.ui = loader.load(ui_file, self)
      
              ui_file.close()
      
              self.web = QWebEngineView()
              print(self.web.load("https://www.google.fr"))
      
              self.ui.view_layout.addWidget(self.web)
      
              self.showMaximized()
      
      if __name__ == "__main__":
          app = QApplication([])
      
          widget = Trader(app)
      
          sys.exit(app.exec_())
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @cc1cc1
      Hello and welcome.

      Did you try loading a non-https URL? Or putting slots on any of its signals to see if anything is being reported?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cc1cc1
        wrote on last edited by cc1cc1
        #3

        i justed try:

        • http / https had same issue

        with checking the signals i can figure out that

        • the signal renderProcessTerminated is emit right after initialisation of QWebEngineView object with:
          status = PySide2.QtWebEngineWidgets.QWebEnginePage.RenderProcessTerminationStatus.CrashedTerminationStatus
          exit code = 159

        • then i use QWebEngineView.load(url) method
          -loadStarted is emit
          -loadProgress(1) is emited

        • the signal renderProcessTerminated is emit right after initialisation of QWebEngineView object with:
          status = PySide2.QtWebEngineWidgets.QWebEnginePage.RenderProcessTerminationStatus.CrashedTerminationStatus
          exit code = 159
          -loadProgress(100) is emited

        1 Reply Last reply
        1
        • C Offline
          C Offline
          cc1cc1
          wrote on last edited by
          #4

          anyone have idea?

          1 Reply Last reply
          0

          • Login

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