mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Detach PyQt6 QPixmap instance before returning
This commit is contained in:
parent
9a4b3e05d6
commit
73600eea94
6
.github/workflows/test-windows.yml
vendored
6
.github/workflows/test-windows.yml
vendored
|
@ -80,6 +80,12 @@ jobs:
|
|||
pytest-cov
|
||||
pytest-timeout
|
||||
|
||||
- name: Install CPython dependencies
|
||||
if: "!contains(matrix.python-version, 'pypy')"
|
||||
run: >
|
||||
python3 -m pip install
|
||||
PyQt6
|
||||
|
||||
- name: Install dependencies
|
||||
id: install
|
||||
run: |
|
||||
|
|
|
@ -213,4 +213,7 @@ def toqimage(im: Image.Image | str | QByteArray) -> ImageQt:
|
|||
|
||||
def toqpixmap(im: Image.Image | str | QByteArray) -> QPixmap:
|
||||
qimage = toqimage(im)
|
||||
return getattr(QPixmap, "fromImage")(qimage)
|
||||
pixmap = getattr(QPixmap, "fromImage")(qimage)
|
||||
if qt_version == "6":
|
||||
pixmap.detach()
|
||||
return pixmap
|
||||
|
|
Loading…
Reference in New Issue
Block a user