WebView and web settings

In this section, we will dive deeper into the features available in Qt's WebEngine and explore the settings that we can use to customize our WebView. We will use the source files from the previous example and add more code to it.

How to do it…

Let's explore some of the basic features of the Qt WebEngine:

  1. First of all, open up mainwindow.ui and add a vertical layout under the progress bar. Then, add a Plain Text Edit widget (under the input widget category) and a Push button to the vertical layout. Change the display of the Push button to Load HTML and set the plaintext property of the plain text edit widget to the following:
    <Img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"></img> ...

Get Qt5 C++ GUI Programming Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.