The program crashes while using PyQtWebEngine (original) (raw)
November 20, 2025, 1:04pm 1
Hello everyone!
My program worked flawlessly in both Windows and Ubuntu.
The platform is a Jetson Orin NX. Now the program breaks at the line:
web.page().setWebChannel(channel), without any error output.
I reinstalled the PyQt5 and PyQtPyQtWebEngine packages.
import sys
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtWidgets import QApplication
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets, QtWebChannel
from pathlib import Path
import os
lst = [[76.8805471, 43.2201317], [76.8812433, 43.2205473], [76.8822508,43.2211566]]
k = -1
class Backend(QtCore.QObject):
@QtCore.pyqtSlot(int, result=list)
def getRef(self, x):
global val, k
print("inside getRef", x)
k = k + 1
if k == 2: # 9
k = -1
s = lst[k]
return s
backend = Backend()
app = QApplication(sys.argv)
channel = QtWebChannel.QWebChannel()
web = QWebEngineView()
web.page().setWebChannel(channel) # <------ !!!!!!!
channel.registerObject("backend", backend)
url = "test_work_3_only_map.html"
web.load(url)
web.resize(1280, 720)
web.show()
sys.exit(app.exec_())
What could be affecting the operation?
Help me please.
Thank you!
I just saw this message..
system Closed December 4, 2025, 3:01pm 5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
