mirror of
https://github.com/pythonguis/pythonguis-examples.git
synced 2025-02-03 17:13:00 +08:00
30 lines
1.2 KiB
Markdown
30 lines
1.2 KiB
Markdown
|
# Mozzarella Ashbadger — Upgrade your browsing with tabs
|
|||
|
|
|||
|
Mozarella Ashbadger is the latest revolution in web
|
|||
|
browsing! Go back and forward! Print! Save files! Get help!
|
|||
|
(you’ll need it). Any similarity to other browsers is entirely
|
|||
|
coincidental.
|
|||
|
|
|||
|
![Browser tabbed](screenshot-browser-tabbed.png)
|
|||
|
|
|||
|
> If you think this example app is neat and want to learn more about
|
|||
|
PyQt in general, [take a look at my ebook & online course
|
|||
|
"Create Simple GUI Applications"](https://martinfitzpatrick.name/create-simple-gui-applications)
|
|||
|
which covers everything you need to know to start building your own applications with PyQt.
|
|||
|
|
|||
|
## Code notes
|
|||
|
|
|||
|
### Tabbing
|
|||
|
|
|||
|
Adding tab support complicates the internals of the browser a bit, since we
|
|||
|
now need to keep track of the currently active browser view, both to update
|
|||
|
UI elements (URL bar, HTTPs icon) to changing state in the currently active
|
|||
|
window, and to ensure the UI events are dispatched to the correct web view.
|
|||
|
|
|||
|
This is achieved by using intermediate slots which filter events, and by
|
|||
|
adding signal redirection (using lamba functions to keep it short).
|
|||
|
|
|||
|
## Other licenses
|
|||
|
|
|||
|
Icons used in the application are by [Yusuke Kamiyaman](http://p.yusukekamiyamane.com/).
|