Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2664

PyQt applications do not use system window decorations or user-installed themes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.6.3
    • PySide
    • None
    • Linux/Wayland

    Description

      NOTE: I had trouble building a PySide2 app, so I only tested with 6.6.3, but I can confirm 5 is affected as well.

      I noticed my PyQt apps, installed in official packages, community flatpaks, or from pywheels, cannot apply some system theming. I also tested by building a simple demo app in python and another demo in C++ to confirm the issue.

      Now, for theme, this isn't a massive issue, as many devs, such as those of Anki and Calibre, in which I discovered this bug, do not officially support QT theming.

      However, incorrect window decorations and controls are glaringly inconsistent and potentially confusing.

      Fedora 39 Workstation (GNOME) comes with preinstalled qt wayland window decorations (QAdwaitaDecorations), which appear on non-py qt apps, but only libbradient is used on pyqt apps. I installed kvantum manager via dnf, which appear on non-py qt apps.

      I was able to partially resolve this for some pyqt apps (Calibre and Anki) by using unofficial flatpaks and switching them to the appropriate kde runtime.

      If I set the decorations using an env variable (QT_WAYLAND_DECORATION=adwaita), the console shows "Requested decoration  "adwaita"  not found, falling back to default"
      Likewise for changing the theme:

      "QApplication: invalid style override 'kvantum' passed, ignoring it.
          Available styles: Windows, Fusion"

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            adonnen Adonnen Dagnir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes