Update browser_tabbed.py

Added tab Title/ tooltip support change. Noticed this missing and got this working on mine with the above mods and figured I'd share this upstream. Thanks for the awesome examples and code.
This commit is contained in:
WhatTheServer 2020-09-14 23:31:16 -04:00 committed by GitHub
parent 20b3f89f2e
commit b8c8cbaa44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,7 +156,10 @@ class MainWindow(QMainWindow):
# correct tab
browser.urlChanged.connect(lambda qurl, browser=browser:
self.update_urlbar(qurl, browser))
browser.titleChanged.connect(lambda _, i=i, browser=browser:
self.setTabText(i, browser.page().title()))
browser.titleChanged.connect(lambda _, i=i, browser=browser:
self.setTabToolTip(i, browser.page().title()))
browser.loadFinished.connect(lambda _, i=i, browser=browser:
self.tabs.setTabText(i, browser.page().title()))