Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1
-
None
-
XUbubtu 14.04 32 Bit in Virtual Machine on Windows 7
Description
I tried the standalone webchannel example on Linux (Ubuntu 14.04). It works correctly with the standard browser firefox (Version 43.0). Then I changed the example program to use the Qt WebEngine in the following way:
instead of
QDesktopServices::openUrl(url);
I instantiate a QWebEngineView (I also included QWebEngineView and added webenginewidgets in the list of used modules):
QWebEngineView webView;
webView.load(url);
webView.show();
When I start the new application I have two separate windows. One with the C++ dialog and another with the Web-page.
The C++-Dialog shows the text
Initializing WebChannel...
Initialization complete, opening browser at file:///home/oepnv/work/examples/build-webchannel-Desktop_Qt_5_5_1_GCC_32bit-Debug/standalone/index.html?webChannelBaseUrl=ws://127.0.0.1:12345.
And the Web-Dialog shows:
Connecting to WebSocket server at ws://127.0.0.1:12345.
So the initialization of the WebCannel is not complete and I cannot send messages.
If I open firefox with the printed Url the channel is initialized correctly:
Connecting to WebSocket server at ws://127.0.0.1:12345.
WebSocket connected, setting up QWebChannel.
Connected to WebChannel, ready to send/receive messages!
And I can send messages from there.
I also tried this under WIndows (Windows 7). Here the program crashes the web-view-window.