Skip to content

Commit

Permalink
auto icon
Browse files Browse the repository at this point in the history
Automatically set icon of webpage as window icon
  • Loading branch information
Ksengine committed Oct 20, 2020
1 parent d83f4f2 commit e9573f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webview/platforms/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ def __init__(self, window):
if getattr(window, 'auto_title, False): # automatically set webpage title as window title
self.view.setWindowTitle.connect(self.set_title)

if getattr(window, 'auto_icon, False): # automatically set webpage icon as window icon
self.view.iconChanged.connect(lambda : self.setWindowIcon(self.view.icon()))

self.setCentralWidget(self.view)

self.create_window_trigger.connect(BrowserView.on_create_window)
Expand Down

0 comments on commit e9573f8

Please sign in to comment.