diff options
-rw-r--r-- | examples/webenginequick/quicknanobrowser/BrowserWindow.qml | 2 | ||||
-rw-r--r-- | examples/webenginewidgets/simplebrowser/browser.cpp | 2 | ||||
-rw-r--r-- | src/core/doc/src/qtwebengine-features.qdoc | 16 |
3 files changed, 20 insertions, 0 deletions
diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml index 7c2a21cd5..ef4af5d4f 100644 --- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml +++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml @@ -510,6 +510,8 @@ ApplicationWindow { } } ] + settings.localContentCanAccessRemoteUrls: true + settings.localContentCanAccessFileUrls: false settings.autoLoadImages: appSettings.autoLoadImages settings.javascriptEnabled: appSettings.javaScriptEnabled settings.errorPageEnabled: appSettings.errorPageEnabled diff --git a/examples/webenginewidgets/simplebrowser/browser.cpp b/examples/webenginewidgets/simplebrowser/browser.cpp index c1f5ddd55..f1ed68739 100644 --- a/examples/webenginewidgets/simplebrowser/browser.cpp +++ b/examples/webenginewidgets/simplebrowser/browser.cpp @@ -23,6 +23,8 @@ BrowserWindow *Browser::createHiddenWindow(bool offTheRecord) QString::fromLatin1("simplebrowser.%1").arg(qWebEngineChromiumVersion()))); m_profile->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true); m_profile->settings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true); + m_profile->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true); + m_profile->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, false); QObject::connect(m_profile.get(), &QWebEngineProfile::downloadRequested, &m_downloadManagerWidget, &DownloadManagerWidget::downloadRequested); } diff --git a/src/core/doc/src/qtwebengine-features.qdoc b/src/core/doc/src/qtwebengine-features.qdoc index dc38f5069..3b74a4dd6 100644 --- a/src/core/doc/src/qtwebengine-features.qdoc +++ b/src/core/doc/src/qtwebengine-features.qdoc @@ -31,6 +31,7 @@ \li \l{webrtc_feature}{WebRTC} \li \l{Web Notifications} \li \l{Favicon Handling} + \li \l{HTML5 WebSockets} \endlist \section1 Audio and Video Codecs @@ -619,4 +620,19 @@ to be stored in the database. \note The icon database is not available for off-the-record profiles. + + \section1 HTML5 WebSockets + + \QWE supports the WebSocket JavaScript API to communicate with WebSocket servers + using the \c {ws://} or \c {wss://} protocols. Moreover, integration with Qt WebChannel + and Qt WebSockets enables communication between JavaScript and the native side of + the application. + + The Qt WebChannel module has a great example for a + \l[QtWebChannel]{Qt WebChannel ChatServer Example}{chat server} + and its web based + \l[QtWebChannel]{Qt WebChannel ChatClient HTML Example}{chat client}. + The client works out of the box in the example browsers of \QWE + (such as \l{WebEngine Widgets Simple Browser Example} + {Simple Browser} or \l{WebEngine Quick Nano Browser}{Nano Browser}). */ |