summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2023-09-21 11:23:44 +0200
committerFlorian Bruhin <me@the-compiler.org>2023-09-21 11:24:04 +0200
commit434f6906f9088172494fa7e219a856d893ed55ba (patch)
tree39daeed9e160cfacb31594d3b9ee5f6429e819e5
parent5207c4b6259d479169a0caee3970002ee6ac19b0 (diff)
downloadqutebrowser-434f6906f9088172494fa7e219a856d893ed55ba.tar.gz
qutebrowser-434f6906f9088172494fa7e219a856d893ed55ba.zip
Add TabBarStyle TypeError workaround
-rw-r--r--doc/changelog.asciidoc2
-rw-r--r--qutebrowser/mainwindow/tabwidget.py5
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index b02daf73e..c5abc1aef 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -32,6 +32,8 @@ Fixed
no longer accumulate connections over time. (#7888)
- The workaround for crashes when using drag & drop on Wayland with Qt 6.5.2 now also
works correctly when using `wayland-egl` rather than `wayland` as Qt platform.
+- Worked around a weird `TypeError` with `QProxyStyle` / `TabBarStyle` on
+ certain platforms with Python 3.12.
- Upgraded the bundled Qt version to 6.5.3. Note this is only relevant for the
macOS/Windows releases, on Linux those will be upgraded via your distribution
packages. This Qt patch release comes with
diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py
index c0c7ee2ad..42c31c97e 100644
--- a/qutebrowser/mainwindow/tabwidget.py
+++ b/qutebrowser/mainwindow/tabwidget.py
@@ -801,6 +801,11 @@ class TabBarStyle(QProxyStyle):
ICON_PADDING = 4
+ def __init__(self, style=None):
+ # "useless" override as WORKAROUND for
+ # https://www.riverbankcomputing.com/pipermail/pyqt/2023-September/045510.html
+ super().__init__(style)
+
def _base_style(self) -> QStyle:
"""Get the base style."""
style = self.baseStyle()