[Development] QWebChannel communication with QWebEngineView
Scott Bloom
scott at towel42.com
Fri Sep 26 18:29:12 CEST 2025
From: Arno Rehn <a.rehn at menlosystems.com>
Sent: Friday, September 26, 2025 02:02
To: development at qt-project.org
Cc: Scott Bloom <scott at towel42.com>
Subject: Re: [Development] QWebChannel communication with QWebEngineView
Hey Scott,
On 26.09.2025 01:31, Scott Bloom wrote:
I have found the webchannel examples. However, my need isn’t covered and I cant for the life extend any of the examples.
The goal is to have a dialog window with a QWebEngineView widget instantiated, the application is all C++.
The main page loaded will be in qrc, but loads other scripts that are also in the qrc.
Is there any example out there that shows a simple WebChannel based communication between Widgets a WebEngineView?
Yes, the RecipeBrowser example does just this: https://doc.qt.io/qt-6/qtwebengine-webenginewidgets-recipebrowser-example.html
Note that QtWebChannel is agnostic to the concrete transport that's used. That's why none of the examples
in the QtWebChannel repo interact with a webview and the actual webview-using examples are in QtWebEngine.
QtWebEngine provides a specialized transport based on Chromium IPC. It's used automatically when you call QWebEnginePage::setChannel() [https://doc.qt.io/qt-6/qwebenginepage.html#setWebChannel].
Cheers,
Arno
Ill take a look. I really appreciate the pointer!
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20250926/9d790b9e/attachment.htm>
More information about the Development
mailing list