From c078fa69e76966a60b9171a4f6bf1d41725bf94e Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Fri, 6 Oct 2023 19:10:19 +0100 Subject: [PATCH] Only create one infotab at initialisation. --- app/infotabs.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/infotabs.py b/app/infotabs.py index c216f3d..aba9280 100644 --- a/app/infotabs.py +++ b/app/infotabs.py @@ -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):