Qt WebEngine Features

Qt WebEngine supports the following Chromium features:

Audio and Video Codecs

Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the required proprietary audio and video codecs, such as H.264 and MPEG layer-3 (MP3), have been enabled. Proprietary codecs can be enabled by passing the following option to qmake when building Qt WebEngine:


  qmake WEBENGINE_CONFIG+=use_proprietary_codecs

Warning: When distributing proprietary codec libraries, you must acquire licenses for them.

FFmpeg is a cross-platform solution to record, convert, and stream audio and video. It can be configured for use with several codecs, which rises licensing issues during distribution with the codec libraries. For some codecs, open source implementations, such as OpenH264, are available.

Chromium DevTools

The Chromium DevTools provide the ability to inspect and debug layout and performance issues of any web content.

This feature can be tested by launching a Qt WebEngine application with the command line option --remote-debugging-port=[your-port] or by setting the environment variable QTWEBENGINE_REMOTE_DEBUGGING, and then using a Chromium based browser (such as Demo Browser or Nano Browser) to connect to http://localhost:[your-port].

For more information, see Qt WebEngine Debugging and Profiling.

Drag and Drop

Qt WebEngine supports HTML5 drag and drop.

This feature can be tested by opening an HTML5 drag and drop demo, such as HTML5 Demos - Drag and Drop, HTML5 Demos - Simple Drag and Drop, or HTML5 Demos - Drag and Drop, Automatic Upload, in Demo Browser or Nano Browser.

Dragging files into the browser is not actually part of HTML5, but it is supported. It can be tested by opening HTML5 Demos - File API.

Support for this feature was added in Qt 5.7.0.

Fullscreen

Qt WebEngine supports viewing web content in fullscreen mode. For more information, see WebEngineSettings.fullscreenSupportEnabled, WebEngineView.fullScreenRequested, QWebEngineSettings::FullScreenSupportEnabled, and QWebEnginePage::fullScreenRequested.

This feature can be tested by playing a video from YouTube in Demo Browser or Nano Browser, and clicking the full screen icon to go into fullscreen mode.

Support for this feature was added in Qt 5.6.0.

HTML5 DRM

Qt WebEngine supports viewing DRM protected videos if the Widevine DRM plugin has been installed.

The video format most commonly used by DRM services, H.264, requires proprietary audio and video codecs. For more information about enabling the codecs, see Audio and Video Codecs.

This feature can be tested by playing a video in Demo Browser or Nano Browser from castLabs, Swank Motion Pictures, Inc., or Shaka Player.

Support for this feature was added in Qt 5.7.0.

HTML5 Geolocation

Qt WebEngine supports JavaScript Geolocation API with Qt Location as a backend. The application has to explicitly allow the feature by using QWebEnginePage::Geolocation or WebEngineView.Feature.

This feature can be tested if Qt Location has been built before Qt WebEngine. The http://html5demos.com/geo page can be opened in the Demo Browser and allowed to find the current position of the user. Note that on Windows an external GPS receiver must be connected to the application. For more information, see Qt Positioning.

Support for this feature was added in Qt 5.5.0.

Pepper Plugin API

Qt WebEngine supports loading Pepper Plugin API (PPAPI) plugins if WebEngineSettings::pluginsEnabled or QWebEngineSettings::PluginsEnabled is set.

Except for the Adobe Flash Player plugin, the plugins must be loaded manually using the Chromium command line syntax with the --register-pepper-plugins argument. The argument value is a list of entries, separated by commas, that contain the file path and one or several MIME types, separated by semicolons:


  <file-path-plugin1>;<mime-type-plugin1>,<file-path-plugin2>;<mime-type1-plugin2>;<mime-type2-plugin2>

For example:


  --register-pepper-plugins="libppapi_example.so;application/x-ppapi-example"

The MIME type is important because it determines which embeds the plugin is used for.

Support for this feature was added in Qt 5.6.0.

Pepper Flash Player Plugin Support

The Pepper Flash player plugin can be loaded automatically if it is installed in one of the following locations, depending on the platform:

  • Windows
    
      C:\Windows\SysWOW64\Macromed\Flash\pepflashplayer*.dll
      C:\Windows\System32\Macromed\Flash\pepflashplayer*.dll
    
    
  • OS X
    
      /Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin
    
    
  • Linux
    
      /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so
      /usr/lib/adobe-flashplugin/libpepflashplayer.so
      /usr/lib/PepperFlash/libpepflashplayer.so
      /usr/lib64/chromium/PepperFlash/libpepflashplayer.so
    
    

You can also load the Pepper Flash player from a specific location by using command line arguments:


  --ppapi-flash-path=./libpepflashplayer.so

By default, the Flash version is set to 11.2.999.999. You can use the ppapi-flash-version= argument to set another Flash version in the format major.minor.build.revision:


  --ppapi-flash-version=16.0.0.235

This feature can be tested in Demo Browser or Nano Browser if the Adobe Flash PPAPI plugin is installed and plugins are enabled in the browser. To test the feature, the https://helpx.adobe.com/flash-player.html page can be opened in the browser.

Qt WebEngine supports printing a web page to a PDF file. For more information, see QWebEnginePage::printToPdf() and WebEngineView.printToPdf.

This feature can be tested in Demo Browser by selecting File > Print to PDF.

Support for this feature was added in Qt 5.7.0.

WebRTC

WebRTC provides browsers with Real-Time Communications (RTC) capabilities via simple APIs. For more information, see WebEngineView.Feature and QWebEnginePage::Feature.

This feature can be tested by setting up a webcam or microphone and then opening https://test.webrtc.org/ in Simple Browser or Nano Browser.