Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
-2
rated 0 times [  5] [ 7]  / answers: 1 / hits: 6577  / 10 Years ago, tue, december 16, 2014, 12:00:00

With QtWebkit it is possible to expose C++ objects to Javascript via QWebFrame::addToJavaScriptWindowObject as described in https://stackoverflow.com/a/20685002/595937



Can the same thing be accomplished in Qt 5.4 using QtWebEngine?


More From » c++

 Answers
4

Exporting C++ objects to HTML/JS is not directly possible with QWebEngine.



Instead, the newly introduced QWebChannel provides a bridge between HTML/JS and C++. Have a look at the documentation, especially at the examples. There was also a quite good introductory talk about QWebChannel at this year's Qt Developer Days, which might also be of interest to you. The videos of the talks will go online in a few weeks.


[#40590] Monday, December 15, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bryantc

Total Points: 455
Total Questions: 96
Total Answers: 110

Location: San Marino
Member since Thu, Jun 30, 2022
2 Years ago
bryantc questions
Fri, Aug 13, 21, 00:00, 3 Years ago
Tue, Mar 30, 21, 00:00, 3 Years ago
Fri, Jun 5, 20, 00:00, 4 Years ago
Wed, May 27, 20, 00:00, 4 Years ago
;