Only create one infotab at initialisation.
This commit is contained in:
parent
da8272b29b
commit
c078fa69e7
@ -21,13 +21,13 @@ class InfoTabs(QTabWidget):
|
|||||||
# re-use the oldest one later)
|
# re-use the oldest one later)
|
||||||
self.last_update: Dict[QWebEngineView, datetime] = {}
|
self.last_update: Dict[QWebEngineView, datetime] = {}
|
||||||
self.tabtitles: Dict[int, str] = {}
|
self.tabtitles: Dict[int, str] = {}
|
||||||
count = Config.MAX_INFO_TABS
|
|
||||||
while count:
|
# Create one tab which (for some reason) creates flickering if
|
||||||
|
# done later
|
||||||
widget = QWebEngineView()
|
widget = QWebEngineView()
|
||||||
widget.setZoomFactor(Config.WEB_ZOOM_FACTOR)
|
widget.setZoomFactor(Config.WEB_ZOOM_FACTOR)
|
||||||
self.last_update[widget] = datetime.now()
|
self.last_update[widget] = datetime.now()
|
||||||
tab_index = self.addTab(widget, "")
|
tab_index = self.addTab(widget, "")
|
||||||
count -= 1
|
|
||||||
|
|
||||||
|
|
||||||
def open_in_songfacts(self, title):
|
def open_in_songfacts(self, title):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user