Only create one infotab at initialisation.

This commit is contained in:
Keith Edmunds 2023-10-06 19:10:19 +01:00
parent da8272b29b
commit c078fa69e7

View File

@ -21,13 +21,13 @@ class InfoTabs(QTabWidget):
# re-use the oldest one later)
self.last_update: Dict[QWebEngineView, datetime] = {}
self.tabtitles: Dict[int, str] = {}
count = Config.MAX_INFO_TABS
while count:
widget = QWebEngineView()
widget.setZoomFactor(Config.WEB_ZOOM_FACTOR)
self.last_update[widget] = datetime.now()
tab_index = self.addTab(widget, "")
count -= 1
# Create one tab which (for some reason) creates flickering if
# done later
widget = QWebEngineView()
widget.setZoomFactor(Config.WEB_ZOOM_FACTOR)
self.last_update[widget] = datetime.now()
tab_index = self.addTab(widget, "")
def open_in_songfacts(self, title):