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. QWebEngine crashes with WebGL content
Qt 6.11 is out! See what's new in the release blog

QWebEngine crashes with WebGL content

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 769 Views 2 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.
  • P Offline
    P Offline
    Pythonic person
    wrote on last edited by Pythonic person
    #1

    hi, am trying to open my unity WebGL game with pyqt5 by using QWebEngine, any way the game works correctly with google chrome (localhost game) but whoever I tried to open the same game using QWbEngine, my application (pyqt5) crahses with following error:

    Windows fatal exception: access violation
    Process finished with exit code -1073741819 (0xC0000005)

    here is the following code which amk using:

    from PyQt5.QtWidgets import QApplication, QMainWindow
    from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings
    from PyQt5.QtCore import QUrl
    
    
    class MainWindow(QMainWindow):
        def __init__(self):
            super(MainWindow, self).__init__()
    
            self.browser = QWebEngineView()
            # Enable WebGL in QWebEngineSettings
            settings = QWebEngineSettings.globalSettings()
            settings.setAttribute(QWebEngineSettings.WebGLEnabled, True)
            try:
                self.browser.setUrl(QUrl('http://localhost:7898/'))
            except Exception as e:
                print(e)
            self.setCentralWidget(self.browser)
    
    
    if __name__ == "__main__":
        app = QApplication([])
        QApplication.setApplicationName("Python PyQt5 Web Browser")
        window = MainWindow()
        window.show()
        app.exec_()
    
    

    NOTE: the game am trying to render is an empty 3D scene so it's not a complex 3d scene at all.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should contact the PyQt folks on their forum as they will have better insight for that question.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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