Python How to Make Browser in PyQt5 with PyQtWebEngine

In this Python article i want to show you How to Make Browser in PyQt5 with PyQtWebEngine.

 

 

 

Also you can check more Python GUI articles in the below links

1: Kivy GUI Development Tutorials

2: Python TKinter GUI Development 

3: Psyide2 GUI Development 

4: wxPython GUI Development 

5: PyQt5 GUI Development Course

 

 

 

 

What is PyQtWebEngine?

PyQtWebEngine is a set of Python bindings for The Qt Company’s Qt WebEngine framework.

The framework provides the ability to embed web content in applications and is based on

the Chrome browser. The bindings sit on top of PyQt5 and are implemented as three

separate modules corresponding to the different libraries that make up the framework.

 

 

License

PyQtWebEngine is released under the GPL v3 license and under a commercial license

that allows for the development of proprietary applications.

 

 

 

Installation

PyQtWebEngine source packages for the GPL version can be dowloaded from River Bank Computing Website 

 

Wheels for the GPL version for 32 and 64-bit Windows, 64-bit OS X and 64-bit Linux can be installed from PyPI:

 

pip install PyQtWebEngine

pip3 install PyQtWebEngine

 

 

 

 

OK now this is the complete code for Python How to Make Browser in PyQt5 with PyQtWebEngine

 

 

 

 

So in the above code these are the imports that we need.

 

 

 

 

And this is the object of QApplication and QWebEngineView.

 

 

 

 

OK now in here we are going to load our url also we need to show that.

 

 

 

 

 

So run the complete code and this will be the result 

Python How to Make Browser in PyQt5 with PyQtWebEngine
Python How to Make Browser in PyQt5 with PyQtWebEngine

 

 

 

 

 

 

Also you can watch the complete video for this article 

Subscribe and Get Free Video Courses & Articles in your Email

 

4 thoughts on “Python How to Make Browser in PyQt5 with PyQtWebEngine”

  1. Hello & Thanks :
    If you entered a search arg in the Google site , would it have navigated to search results ,
    and if you clicked on one of those links , would it have navigated to that site ?
    I have written a kidSafeBrowser in vb.net , but its IE11 , so much good .
    So I a looking alternatives .
    In your Browser can I check clicked-on-link and compare it against a SafeSites.txt file .
    If there’s a hit , go there , else no go ?
    Thanks for your Help…
    Vernon Marsden

    • PyQtWebEngine class is a big class and you can do everything you want, just check the documentation for more information.

  2. Hello,

    For some reason this doesn’t work. It runs through the code and exits without showing the browser. Others on your youtube video are posting the same issue. Can you please help with this? Thank you.

    • can you run the code via terminal and see what is the error, using terminal you can track the error, get the error and comment here i will check that

Comments are closed.

Share via
Copy link
Powered by Social Snap
×