Tag: qt5
pyqt5 webview

PyQt5 comes with a webkit webbrowser. Webkit is an open source web browser rendering engine that is used by Apple Safari and others. It was used in the older versions of Google Chrome, they have switched to the Blink rendering engine.
Related course:
Create GUI Apps with PyQt5
QWebView
The widget is called QWebView and webpages (HTML content) can be shown through this widget, local or live from the internet.
Methods
The QWebView class comes with a lot of methods including:
- back (self)
- forward (self)
- load (self, QUrl url)
- reload (self)
|
Related course:
Create GUI Apps with PyQt5
pyqt treeview
PyQt5 (python with qt5 bindings) supports a tree view widget (class QTreeView). In this article we will show how to use the widget.
The image shows a QTreeView widget with data inside it.
Related course:
Create GUI Apps with PyQt5
PyQt5 Treeview Example
The code below will create a treeview using the QTreeView class (Run using Python 3). Data is added to the treeview by code. Explanation of the code is below the code block.
|
If you are new to programming Python PyQt, I highly recommend this book.
Treeview Explanation
We create a new tree view object using the line:
|
The view is set to have a model,
|
Where model is
|
Then we add data using:
|
