Improving a bit the MiniBrowser.

The MiniBrowser just works!
But it has to be improved in many ways before we start to feel comfortable using it.

To correct the first point, we could change the implementation of on_btnNavigate_released as follows:

@pyqtSignature("")
def on_btnNavigate_released(self):
    """
    Public slot invoked when the user clicks the Navigate Button .
    #TODO: check out this code, ensure it does cover all the possibilities     """
    theUrl = self.txtUrl.text()
    if theUrl[0:7] != 'http://':
         theUrl = 'http://' + theUrl
    self.webEngineView.setUrl(QUrl(theUrl))

This is probably not the best piece of software ever written, but it should do the trick.
Also, we have added a rudimentary check for a valid URL, but that has to be improved (what would happen if trying to navigate to an https:// site, for instance?)
See how I've set a todo-comment in the code, just as a reminder that this method should be checked to ensure it works in all cases.
These todo-comments can be browsed through the task viewer.



As for the second and third points, we should get the MainWindow class to receive two more signals.
We definitely have to take a look at the Qt documentation (which is the right thing to do as we want to develop software using the Qt framework, and it is easily accesible either through the eric6 help viewer or by using the Qt assistant tool).
We need to get familiar with the signal/slots language construct.
We also need to take a look at the QWebEngineView class reference. We will find that there are a couple signals that will be useful: titleChanged() and urlChanged().
From the Qt documentation, we learn that these signals 'are emitted whenever the title of the main frame changes/the url of the view changes'.

To get this signals attached to slots in the MainWindow class, we right-click on the mainwindow.ui item (project viewer, forms tab) and select again Generate dialog code.... We have already done this sort of thing in chapter 2.
As this is the second time we perform this action for this form, we don't need to create a new class and/or file.
Furthermore, we can see that on_btnNavigate_released is already checked (as we had left it a while ago).
Now we have to check the methods on_webView_titleChanged and on_webView_urlChanged for the webView item.
We click on Ok and we will find that some new code has been added to the MainWindow class.

@pyqtSignature("QString")
def on_webView_titleChanged(self, title):
    """
    Slot documentation goes here.
    """
    raise NotImplementedError


@pyqtSignature("QUrl")
def on_webView_urlChanged(self, url):
    """
    Slot documentation goes here.
    """
    raise NotImplementedError

As before, we find the @pyqtSignature decorator. This time, it specifies which type of object are received of parameters by the corresponding these methods (QString, QUrl; read on these in the Qt class reference if you are not familiar to).
Like before, the code created by eric6 also keeps a place for documenting our code, it adds some todo-comments, and it raises 'not implemented' errors.

To solve the aforementioned points (title that doesn't refresh, url that doesn't refresh), we just have to code these methods as follows:

@pyqtSignature("QString")
def on_webView_titleChanged(self, title):
    """
    Public Slot invoked when the title of the page changes. All we do is to display it as the main window title.
    """
    self.setWindowTitle(title)


@pyqtSignature("QUrl")
def on_webView_urlChanged(self, url):
    """
    Public Slot invoked when the url changes. All we do is display the current url in txtUrl.
    """
    self.txtUrl.setText(url.toString())

There are still other improvements that could be carried out this way.
For instance, we could use the signal loadProgress(), which 'is emitted every time an element in the web page completes loading and the overall loading progress advances' (see QWebEngineView documentation).
We could use it to display a nice progress bar displaying the overall load status of the page we are visiting.