beeware/toga

Integration of Qt backend with system themes

Open

#3,995 创建于 2025年12月19日

在 GitHub 查看
 (8 评论) (0 反应) (0 负责人)Python (3,615 star) (624 fork)batch import
enhancementgood first issueqt

描述

What is the problem or limitation you are having?

Qt backend currently cannot integrate with system themes on Linux.

Describe the solution you'd like

I, with reviews by Russ, has created, integrated into BeeWare, and gotten accepted https://github.com/beeware/system-pyside6 -- a package that solves this problem. The readme and the issue referenced by the first PR on that repo has additional information about why using the system PySide6 runtime is needed.

To fix:

  1. Add in https://github.com/beeware/toga/blob/main/qt/pyproject.toml#L62-L68 a system extra that installs system-pyside6==0.1.0 instead of the regular PySide6 packages.
  2. In https://github.com/beeware/toga/blob/main/docs/en/reference/platforms/linux/qt.md at the bottom, add that toga-qt[system-pyside6] can be used to use the system PySide6 runtime installed through the system packages that provides provides PySide6; explain that since PySide6 bindings are static, they are specific to one version of Qt and thereforre PySide6s needs to be provided through the system package manager to use the system Qt runtime which will integrate with system-provided themes.
  3. In https://github.com/beeware/toga/blob/main/docs/en/reference/platforms/linux/qt-prerequisites.md, explain that to integrate with system pyside6, installing PySide6 in the system (which auto-installs Qt) is additionally needed; the PySide6 system packages, with minimum distro versions, may be found at the README of https://github.com/beeware/system-pyside6.

Describe alternatives you've considered

There really isn't any after a lot of discussion.

Additional context

No response

贡献者指南